---
title: "Email CLI - Send email and test webhooks from your terminal"
description: "Official Lettermint CLI for macOS, Linux and Windows. Send email, debug deliveries and forward webhooks to localhost. Browser login, no API token."
url: "https://lettermint.co/features/cli"
---


# Lettermint CLI

Send email, check what happened to a message and test webhooks on localhost, all from your terminal. You log in through your browser, so you don't need an API token.

Install on macOS: `brew install lettermint/tap/lettermint`

## Available for macOS, Linux and Windows

Install with Homebrew on macOS, with the install script on Linux, or with the signed PowerShell installer on Windows. Releases are also on [GitHub](https://github.com/lettermint/lettermint-cli/releases). The [CLI documentation](https://lettermint.co/docs/cli#install) has the commands for each system.

Example session:

```sh
lettermint messages send \
  --from hello@acme.com \
  --to ok@lettermint.dev \
  --subject "Welcome to Acme" \
  --text "Thanks for signing up."
lettermint messages events MESSAGE_ID
lettermint webhooks listen --forward-to http://localhost:3000/webhooks
```

## One command and it's done

Send a test email, find out why a message hasn't arrived or set up a domain for a new client. The answer shows up in your terminal and you carry on with your work.

- **Send from a script.** Send an email from any shell script without writing an API client. With an idempotency key, a retry never sends it twice.
- **Debug a delivery.** Look up a message, read its delivery events and export the raw source to compare it with what your application built.
- **Webhooks on localhost.** Forward live events to your local server without a tunnel. Fixed your handler? Replay the same event, no new email needed.
- **Set up a domain.** Add a sending domain, check which DNS records are still missing and assign it to the projects that may send from it.
- **Email for your AI agent.** Export the agent skill, and Claude Code or Codex knows how to send an email and check what happened to it.
- **Several teams, one terminal.** Log in once per team and switch with one command. Each profile keeps its own default project.

More examples are in the [CLI documentation](https://lettermint.co/docs/cli#use-cases).

## Log in once, through your browser

The CLI connects to your account as an application, just like the [MCP server](https://lettermint.co/features/mcp.md). You approve access in your browser, and from then on every command runs with your own team permissions.

Stopped using a computer? Revoke its access under Applications in your account.

- **Browser login** - No API token to create, copy or store.
- **Stored by your operating system** - Your login sits in your system's credential store, not in a config file.
- **Your own permissions apply** - The CLI only reaches the teams and projects you can access.
- **Signed releases** - Every release comes with checksums and build provenance. The macOS and Windows builds carry our signature.

## Frequently asked questions

### What can I do with the Lettermint CLI?

Send email, look up messages and their delivery events, and export what was sent as HTML, text or raw source. You can also manage projects, routes, domains and webhooks, and forward webhooks to localhost. Scheduled and batch sends aren't part of the CLI. For those, use the API or the MCP server.

### How do I install the CLI?

On macOS you install it with Homebrew, on Linux with an install script and on Windows with a signed PowerShell installer. You can also download a release from GitHub. The [CLI documentation](https://lettermint.co/docs/cli) lists the commands for each system.

### Do I need an API token?

No. You run `lettermint auth login` and approve access in your browser. The CLI keeps that login in your operating system's credential store, and every command runs with your own role and project access. You can revoke the connection under Applications in your account.

### Can I use the CLI on a server or in CI?

The CLI is made for your own computer. It logs in through a browser and keeps the login in your system's credential store, which a headless server doesn't have. On servers and in pipelines, send through the API or SMTP with an API token, or use one of our [official SDKs](https://lettermint.co/integrations.md).

### How do I test webhooks on my own machine?

Start your local server and run `lettermint webhooks listen` with `--forward-to` and your local URL. Lettermint forwards events to localhost without a tunnel and signs each request the same way as a production webhook, so your verification code works as is. Fixed a bug? Replay the event within 15 minutes. Your existing webhooks keep running as usual.

### Can an AI agent use the CLI?

Yes. Run `lettermint skills export` and point Claude Code, Codex or another agent at the folder. The skill explains the commands and what an agent should watch out for. Your agent works within your permissions and can't go beyond them. Want to connect an assistant without installing anything? Use the [MCP server](https://lettermint.co/features/mcp.md).

### Is the Lettermint CLI open source?

Yes, under the MIT license. The source code and every release are on [GitHub](https://github.com/lettermint/lettermint-cli). Releases come with checksums and build provenance, the macOS build is notarized by Apple and the Windows installer is signed by Lettermint B.V.

### Is the CLI included in my plan?

Yes, the CLI works on every plan, including the Free plan. Emails you send with it count toward your plan like any other email and go through the same [European infrastructure](https://lettermint.co/european-email.md). See [pricing](https://lettermint.co/pricing.md) for every plan.

## Try Lettermint for free

Ensure your emails reach the right inbox. Transactional, broadcast and inbound email on one European platform. [Sign up for free](https://app.lettermint.co/register) and send your first email within minutes.
