# agentmail-cli

Gives your agent the official AgentMail CLI: inboxes, messages, drafts, webhooks and domains, with JSON or YAML output.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1700 installs · ★ 25
- Author: agentmail-to
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/agentmail-to/agentmail-skills/tree/HEAD/agentmail-cli/SKILL.md
- Updated: 2026-10-06
- HTML: https://affpapa.org/en/nevibecode/skills/agentmail-cli

## What it does

The skill spells out `agentmail` commands and how to call them. Your agent gets ready examples for inboxes, messages and threads, drafts, pods, webhooks and domains — from `agentmail inboxes list` to `agentmail domains verify --domain-id <domain_id>`. A resource nested under another becomes a nested subcommand: `inboxes messages`, `pods threads`. The colon form `inboxes:messages` is rejected in CLI 1.x, so older snippets you find elsewhere will fail.

Setup is two steps: `npm install -g agentmail-cli`, then `export AGENTMAIL_API_KEY="am_..."`. A single call can override the key with `--api-key`, and `--base-url` or `--environment` help when the API is not on the default host. Output is controlled by `--format`: `auto`, `pretty`, `json`, `jsonl`, `yaml`, `raw`, `explore`. Handy when a script parses the result.

The skill stays away from SDK code, MCP setup and framework adapters — it is not meant for those. Deleting an inbox cannot be undone, so check the `--inbox-id` first. Replies need a message ID, and you should fetch the full message before trusting its body. For any administrative command the skill does not cover, run `agentmail --help` and the resource's own help.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/agentmail-cli/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/agentmail-cli/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/agentmail-cli/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/agentmail-cli/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install agentmail-to/agentmail-skills agentmail-cli
```

2. **Manually: put the files in place**
- File: `.github/skills/agentmail-cli/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/agentmail-to/agentmail-skills --path agentmail-cli
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/agentmail-cli/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/agentmail-to/agentmail-skills/tree/HEAD/agentmail-cli/SKILL.md

## When to use it
- create an inbox for a support agent
- read and search mail in an inbox
- send a reply to a specific message
- stage a draft and send it after review
- dump thread lists as JSON for a script

## Example prompts
- list all my agentmail inboxes
- send a message from the support inbox with subject Hello
- create a draft reply and show it before sending

## Similar
- [gws-gmail](https://affpapa.org/en/nevibecode/skills/gws-gmail.md) — skill · 82100 installs
- [gws-gmail-send](https://affpapa.org/en/nevibecode/skills/gws-gmail-send.md) — skill · 74800 installs
- [email-sequence-designer](https://affpapa.org/en/nevibecode/skills/email-sequence-designer.md) — skill · 1000 installs
- [shopify-email-flows](https://affpapa.org/en/nevibecode/skills/shopify-email-flows.md) — skill · 1100 installs
- [pipefy-members-email-webhooks](https://affpapa.org/en/nevibecode/skills/pipefy-members-email-webhooks.md) — skill · 669 installs
- [cargo-mailbox-management](https://affpapa.org/en/nevibecode/skills/cargo-mailbox-management.md) — skill · 5100 installs

From the same set: [agentmail-to/agentmail-skills](https://affpapa.org/en/nevibecode/by/agentmail-to/agentmail-skills.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
