> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brew.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Commands

> What the Brew CLI includes: every Public API operation as a typed command, plus the conventions all commands share.

Commands follow a `brew-cli <resource> <action>` shape and cover every operation in [Public API v1](/api-reference/api/api-introduction). Run any command with `--help` for its flags and a runnable example, or browse the [generated reference](https://github.com/GetBrew/brew-cli/blob/main/docs/commands/README.md) for the whole surface at once.

## Everyday Commands

The ten you will reach for most:

```bash theme={null}
brew-cli emails generate --prompt "Welcome email for new signups"   # AI-generate a design
brew-cli emails get eml_abc123 --include html,versions              # read a design
brew-cli emails send eml_abc123 --test --to you@company.com --subject "Preview"
brew-cli contacts upsert --email jane@example.com --first-name Jane
brew-cli contacts search --filter email:contains:@acme.com --limit 20
brew-cli audiences list
brew-cli analytics overview --since 2026-08-01T00:00:00Z
brew-cli analytics sends get snd_jkl012 --include events
brew-cli domains list                                               # which senders are verified
brew-cli usage                                                      # plan, credits, send quota
```

For complete worked sequences (launching a campaign, building a welcome automation, QA before a big send), see [Common Flows](/api-reference/cli/common-flows).

## The Surface

| Group                | What it covers                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `contacts`, `fields` | Search, count, upsert (single and batch), update, delete, validate deliverability, CSV import, and custom field definitions                                                                                                        |
| `emails`             | List and fetch designs (with HTML and version history), generate and edit with AI, import HTML or Figma, clone, restore versions, export to another ESP, accessibility audits, client previews, inbox placement tests, and sending |
| `sends`              | Cancel, pause, and resume in-flight or scheduled sends                                                                                                                                                                             |
| `audiences`          | List, create (including from analytics events), update, duplicate, and delete segments                                                                                                                                             |
| `automations`        | The full lifecycle: create and edit graphs, publish and unpublish, suppression-safe test runs, manual runs, trigger contracts (`automations triggers ...`), firing events, and run history                                         |
| `domains`            | Add sending domains, fetch DNS records, verify, health reports, sender defaults, and removal                                                                                                                                       |
| `analytics`          | Account overview, per-send and per-campaign performance, the event feed, and fired trigger instances                                                                                                                               |
| `brand`, `brands`    | The active brand's identity and assets, plus organization-level brand lifecycle                                                                                                                                                    |
| `content`            | Image generation, GIFs, transforms, HTML-to-PNG rendering                                                                                                                                                                          |
| Utility              | `login`, `logout`, `whoami`, `config`, `usage`, `health`, `docs`, and the raw `api` escape hatch                                                                                                                                   |

## Conventions Every Command Shares

* **Two output modes.** Human-readable in a terminal; exact API JSON when you pass `--json` or pipe the output. Data goes to stdout, progress to stderr, so pipes stay clean.
* **Structured inputs.** Simple values are flags. Full request bodies go through `--input '<json>'` (or `--input -` to read stdin), and file uploads through `--file <path>`. Flags win over `--input` on conflicts, and the id in the command line always wins over ids inside a body.
* **Safe by default.** Irreversible commands (campaign sends, deletes, trigger fires) ask for confirmation in a terminal and refuse with exit code 4 anywhere else until you pass `--yes`. Test sends (`emails send --test`) skip the gate.
* **Retry-safe writes.** Pass `--idempotency-key` on any create to make retries [replay instead of duplicate](/api-reference/api/idempotency).
* **Pagination handled.** List commands take `--limit` and `--cursor`, and `--all` follows the cursor to return every page as one result.
* **Typed errors.** Failures print the API's [error envelope](/api-reference/api/errors) with its stable `code` and the `requestId` for support.

## The Escape Hatch

`brew-cli api <method> <path>` sends a raw authenticated request with your key, brand header, and error handling applied:

```bash theme={null}
brew-cli api GET '/v1/analytics/sends?sendId=snd_123&include=events'
```

Useful for brand-new endpoints, unusual query combinations, or exploring the API interactively. Mutating methods go through the same confirmation gate as every other command.

## Discovery

* `brew-cli docs`: pointers to this documentation, the OpenAPI spec, and the agent guide.
* `brew-cli docs api`: the live machine-readable API catalog (`GET /v1/help`).
* `brew-cli docs --agent`: a JSON manifest of every command, flag, and safety class, built for [AI agents](/api-reference/cli/agents).

## Need Help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

<Tabs>
  <Tab title="Self-Service Tools">
    <CardGroup cols="2">
      <Card title="Search Documentation" icon="magnifying-glass" color="#c44925">
        Type in the "Ask any question" search bar at the top left to instantly find relevant documentation pages.
      </Card>

      <Card title="ChatGPT/Claude Integration" icon="robot" color="#c44925">
        Click "Open in ChatGPT" at the top right of any page to explore it further with ChatGPT or Claude.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Talk to Our Team">
    <CardGroup cols="2">
      <Card title="Schedule a Call" icon="calendar" color="#c44925" href="https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ1iYoRUG1J792XQpbuQLjSRRDupr7MwraFK-HQRCtTYdBmrQi8nZu2qXfzKQigb8gbKJK3KN3-R">
        Book time with our founders for personalized guidance on strategy, best practices, or complex implementation questions.
      </Card>

      <Card title="Call Us Directly" icon="phone" color="#c44925">
        Need immediate assistance? Reach us at **+1-(332)-203-2145** for urgent issues or time-sensitive questions.
      </Card>

      <Card title="Slack Channel" icon="slack" color="#c44925">
        Our preferred support channel. You'll receive an invite after signup for direct founder support and fast responses.
      </Card>

      <Card title="Email Support" icon="envelope" color="#c44925" href="mailto:support@brew.new">
        Contact us at **[support@brew.new](mailto:support@brew.new)** for detailed inquiries or if you prefer not to use Slack.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
