---
title: "Command line (CLI)"
description: "Send, inspect, and script every API operation from your terminal and CI."
url: https://www.unitpost.com/docs/cli
section: Docs
updated: 2026-09-18
---
# Command line (CLI)

## Command line (CLI)

> Send, inspect, and script every API operation from your terminal and CI.

`unitpost` is the official command-line interface — one command per API operation, generated from the same OpenAPI contract as the SDKs. Install it, sign in once, and send from your shell, your scripts, and your agents. The complete reference — flags, profiles, JSON mode, CI, troubleshooting — lives on the CLI docs (/docs/cli) page.

### 1. Install

Needs Node.js 20+. Use `npx` for a one-off, or install it globally so `unitpost` is on your PATH.

```bash
# One-off, no install
npx unitpost-cli@latest --help

# Global install
npm install -g unitpost-cli
unitpost --version
```

### 2. Sign in

```bash
unitpost login              # browser sign-in (OAuth 2.1 + PKCE)
unitpost login --no-browser # prints the URL — for SSH / remote shells
unitpost whoami             # which credential is in effect, and its scopes
```

Commands read as `unitpost <resource> <action>` — try `unitpost --help` for all 82, or open the CLI docs (/docs/cli) for auth, profiles, scripting, agents, and CI.

```bash
unitpost --help
unitpost email send --help
unitpost doctor
```

## Related

- [Quickstart](https://www.unitpost.com/docs/quickstart): Create a key, verify a domain, and send your first email.
- [Templates & variables](https://www.unitpost.com/docs/templates): Reference a saved template and pass per-recipient data.
- [Subscription topics](https://www.unitpost.com/docs/topics): Let contacts opt out of one kind of mail without leaving your list.
