# CLI

> The Reply command line — contacts, sequences, inbox, and reports as shell commands with JSON output. Install with npm i -g reply-cli.

## Install

```bash
npm install -g reply-cli      # installs the `reply` command (Node 20+)
# or zero-install:
npx -y reply-cli auth whoami
```

Same API key as every other surface — create one in Reply → **Settings → API Keys**:

```bash
export REPLY_API_KEY=...      # or a .env file, or --api-key
reply auth whoami             # verify: prints your user and team
```

## What it covers

```bash
reply contacts list|get|create|update|delete|search|statuses
reply contacts import prospects.csv --dry-run        # CSV import, auto-mapped columns
reply lists list|get|create|add-contacts
reply sequences list|get|create|update|start|pause|archive
reply sequences stats [id] --preset lastMonth        # performance, --top for best
reply sequences contacts list|add|remove <id>        # enrollment
reply inbox threads list --unread                    # triage
reply inbox reply <threadId> --body-file reply.html  # respond (gated)
reply inbox categories list|assign
reply reports emails --preset lastWeek               # account-level overview
reply email-accounts list|check
reply schedules list|get
```

Every command maps to documented [v3 endpoints](/apis) — the CLI adds no private surface.

## Built for agents

- **JSON everywhere** — `--json` on every command; data on stdout, status on stderr, so output pipes cleanly into `jq` or agent logic.
- **Deterministic errors** — problem+json mapped to one stderr line: `{"error":{status,code,title,detail,hint}}`. Exit codes: 0 ok, 1 API error, 2 usage.
- **Safety by default** — destructive and sending commands prompt for confirmation on a TTY and *refuse* without `--yes` in scripts; bulk commands support `--dry-run` (zero API calls).
- **Rate limits handled** — 429s honor `Retry-After`, 5xx retries back off exponentially; `--all` paginates through any list.
- **Scoped keys work as-is** — a key with `sequences:read` can list but not start.

```bash
# agent-style composition
reply sequences stats --json \
  | jq -r '.[] | select(.emailOverview.repliedPercentage < 1) | .sequenceId' \
  | xargs -I{} reply sequences pause {}
```

## Scope of version 0.2

Covers the core outreach loop: import → organize → enroll → launch → triage replies → measure. Not yet included: prospect search and enrichment (**Coming soon** — the underlying [Live Data](/apis/prospect-search) and [Enrichment](/apis/contact-enrichment) endpoints aren't generally available yet), webhooks admin, tasks, templates, and the AI SDR module (use [REST](/apis) or [MCP](/mcp) for those today).

Source and issues: [github.com/replyio/reply-cli](https://github.com/replyio/reply-cli) · Package: [npmjs.com/package/reply-cli](https://www.npmjs.com/package/reply-cli)

## FAQ

**Does the CLI exist today?**

Yes. Install it with `npm i -g reply-cli` (or run `npx -y reply-cli`). Version 0.2 covers contacts, lists, sequences, inbox, reports, email accounts, and schedules against the v3 API. Prospect search and enrichment commands ship when those API endpoints do.

**Why a CLI when there's already REST and MCP?**

Coding agents are exceptionally good at running shell commands. The CLI gives them composability (pipes, jq, cron) without writing HTTP client code, plus built-in retries, rate-limit handling, confirmation gates, and dry-runs — and gives humans a scriptable surface for one-off operations.

**How does it relate to the Agent Skill?**

The Skill (see /skills) is the reasoning layer — it teaches an agent which workflow to run. The CLI is its execution layer — deterministic commands the skill shells out to. You can use the CLI without the skill; the skill requires the CLI.
