> ## 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.

# CLI Quickstart

> Generate a saved email and send a test to your own inbox with brew-cli, using a brand API key and no audience or verified sending domain.

Generate an on-brand welcome email and receive a test in your inbox.

## Before You Begin

[Add your brand](/get-started/add-your-brand), [install brew-cli](/api-reference/cli/installation), and create a brand API key at [Settings, then API](https://brew.new/settings/api).
The key needs permission to generate emails and send tests. Generation uses [credits](/api-reference/api/credits).

You do not need an audience or a verified domain.

## 1. Connect to Your Brand

```bash theme={null}
brew-cli login
brew-cli brand get --json
```

Paste the key at the login prompt. The brand response has `brandId`, `domain`, `status`, and `ready` at the top level.

Continue when `ready` is `true`. If extraction is running, wait and repeat the read.
For an organization key, [choose a brand first](/api-reference/cli/authentication#brand-vs-organization-keys).

## 2. Generate the Design

```bash theme={null}
brew-cli emails generate \
  --prompt "Create and save a friendly welcome email with one Get started button" \
  --idempotency-key first-cli-email-001 \
  --json
```

Generation can take a minute or more. Copy the returned `emailId`.
If the result contains only `response`, read that explanation and adjust your prompt.

## 3. Send Yourself a Test

Replace `YOUR_EMAIL_ID` with the returned ID and `you@example.com` with your own inbox.

```bash theme={null}
brew-cli emails send YOUR_EMAIL_ID \
  --test \
  --to you@example.com \
  --subject "Welcome aboard" \
  --idempotency-key first-cli-test-001 \
  --json
```

The response is `{ "status": "completed", "recipient": "you@example.com" }`.
Open **\[TEST] Welcome aboard** in your inbox. The test uses Brew's default sender.

Reuse a retry key when recovering the same request. Use a new key for a new design or test.
See [Replay an Unknown Outcome](/api-reference/cli/agents#replaying-an-unknown-outcome).

## Keep Going

* [Common Flows](/api-reference/cli/common-flows): schedule an email or build an automation.
* [Commands](/api-reference/cli/commands): find commands and inspect their flags with `--help`.
* [Use from AI Agents](/api-reference/cli/agents): JSON output, exit codes, and confirmation.

## 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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.