@mailkite/cli 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +88 -76
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,103 +1,115 @@
1
- # @mailkite/cli
2
-
3
- The MailKite command-line client — a wrangler/vercel-style terminal tool for
4
- [MailKite](https://mailkite.dev). Sign in, add domains, set DNS + webhooks, send
5
- mail, and tail inbound messages, all from your shell.
6
-
7
- > **Read-only mirror.** This repo is a generated, release-time mirror of the MailKite
8
- > monorepo (the private source of truth); the source isn't developed here. Install
9
- > `@mailkite/cli` from npm rather than cloning, and see the docs at
10
- > <https://mailkite.dev/docs/cli>.
11
-
12
- It's a **thin layer over the [MailKite Node SDK](https://github.com/mailkite/mailkite-node)**: every network call
13
- goes through the `MailKite` client, so auth, base URL, and error handling live in
14
- one place. The CLI adds token storage, interactive flows, and a one-shot setup
15
- wizard on top.
1
+ <p align="center">
2
+ <a href="https://mailkite.dev">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://mailkite.dev/brand/logo-email-dark.png">
5
+ <img src="https://mailkite.dev/brand/logo-email.png" alt="MailKite" height="56">
6
+ </picture>
7
+ </a>
8
+ </p>
9
+
10
+ <h1 align="center">@mailkite/cli</h1>
11
+
12
+ <p align="center">
13
+ <b>Email for every product you ship</b> — receive email as a webhook, send over a verified domain, give an AI agent its own inbox.
14
+ <br>The official <a href="https://mailkite.dev">MailKite</a> library for the command line.
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="https://mailkite.dev/docs">Docs</a> ·
19
+ <a href="https://mailkite.dev/docs/cli">Library guide</a> ·
20
+ <a href="https://mailkite.dev">mailkite.dev</a> ·
21
+ <a href="https://mailkite.dev/docs/ai-agents">AI agents</a>
22
+ </p>
23
+ <p align="center"><a href="https://www.npmjs.com/package/@mailkite/cli"><img src="https://img.shields.io/npm/v/@mailkite/cli?color=2563eb&label=npm" alt="npm"></a></p>
24
+
25
+ > **Read-only mirror.** This repo is a generated, release-time mirror of the MailKite monorepo (the private source of truth) — development doesn't happen here. Install from npm and open issues against the [MailKite docs](https://mailkite.dev/docs).
26
+
27
+ ## Install
16
28
 
17
29
  ```bash
18
- npx @mailkite/cli --help # no install needed
19
- npm i -g @mailkite/cli # or install the `mailkite` binary globally
30
+ npx @mailkite/cli --help # no install
31
+ npm i -g @mailkite/cli # or install the `mailkite` binary globally
20
32
  ```
21
33
 
22
- ## Quick start
34
+ ## Quickstart
23
35
 
24
36
  ```bash
25
- mailkite signup --email you@example.com --password •••••• # or: login
26
- mailkite domains check myapp.ai # available? + price
27
- mailkite domains register myapp.ai --first-name --email --country US # buy + auto-DNS
28
- mailkite domains add mail.myapp.ai # or add a domain you already own
29
- # …add those records at your DNS provider…
30
- mailkite domains verify <domainId> # MX/SPF/DKIM/DMARC
37
+ mailkite login --email you@example.com
38
+ mailkite domains add mail.myapp.ai # then add the printed DNS records
39
+ mailkite domains verify <domainId> # MX / SPF / DKIM / DMARC
31
40
  mailkite webhook set <domainId> https://myapp.ai/hooks/mailkite
32
41
  mailkite send --from hello@mail.myapp.ai --to you@example.com \
33
42
  --subject "It works" --html "<p>Hi from MailKite</p>"
34
- mailkite messages tail # watch inbound arrive
43
+ mailkite messages tail # watch inbound arrive
35
44
  ```
36
45
 
37
- Or do the whole flow in one command:
38
-
39
- ```bash
40
- mailkite init --email you@example.com --password •••• \
41
- --domain mail.myapp.ai --provider cloudflare \
42
- --webhook https://myapp.ai/hooks/mailkite --to you@example.com --verify
43
- ```
44
-
45
- ## Built for scripts and agents
46
+ ## Commands
46
47
 
47
- - **Fully non-interactive.** Every command works from flags + env; prompts only
48
- appear as a fallback on an interactive TTY. Missing a required flag in a
49
- non-TTY context fails loudly instead of hanging.
50
- - **`--json` everywhere** for machine-readable output.
51
- - **Snappy.** Commands exit immediately when done.
48
+ Full command reference: **https://mailkite.dev/docs/cli**. Common flows:
52
49
 
53
50
  ```bash
54
- ID=$(mailkite domains add mail.app.com --json | jq -r .domain.id)
55
- mailkite domains verify "$ID" --json | jq -e '.status=="verified"'
51
+ mailkite login --email you@example.com
52
+ mailkite domains add mail.myapp.ai # then add the printed DNS records
53
+ mailkite domains verify <domainId> # MX / SPF / DKIM / DMARC
54
+ mailkite webhook set <domainId> https://myapp.ai/hooks/mailkite
55
+ mailkite send --from hello@mail.myapp.ai --to you@example.com \
56
+ --subject "It works" --html "<p>Hi from MailKite</p>"
57
+ mailkite messages tail # watch inbound arrive
56
58
  ```
57
59
 
58
- ## Commands
59
-
60
- | Group | Commands |
61
- | --- | --- |
62
- | Auth | `login`, `signup`, `logout`, `whoami` |
63
- | Send | `send`, `agent`, `route` |
64
- | Domains | `domains list\|add\|get\|verify\|rm`, `dns <id> [--provider]` |
65
- | Webhooks | `webhook set\|rm\|test\|show`, `secret get\|rotate`, `verify-webhook` |
66
- | Receiving | `messages list\|get\|tail`, `routes list\|create`, `deliveries retry` |
67
- | Workflow | `init` (setup wizard), `mcp` (run the MCP server) |
68
-
69
- Run `mailkite <command> --help` or just `mailkite` for the full reference.
70
-
71
- ## Auth & config
72
-
73
- The CLI uses **one bearer token** for everything (sending and management) — the
74
- account token from `login`/`signup`. Resolution order:
60
+ ## Use it from an AI agent — MCP + Agent connectors
75
61
 
76
- 1. `--token <t>` flag
77
- 2. `MAILKITE_API_KEY` / `MAILKITE_TOKEN` env
78
- 3. `~/.mailkite/config.json` (written by `login`/`signup`, mode `600`)
62
+ MailKite speaks the [Model Context Protocol](https://modelcontextprotocol.io): every API method is a tool your AI assistant (Claude, Cursor, …) can call — send mail, manage domains, search the docs, and give an agent its own inbox. Full guide: **[https://mailkite.dev/docs/ai-agents](https://mailkite.dev/docs/ai-agents)**.
79
63
 
80
- Base URL: `--base-url` `MAILKITE_BASE_URL` config › `https://api.mailkite.dev`.
64
+ **Hosted (recommended) — one-click OAuth, no key to copy:**
81
65
 
82
- ## Receiving without a public URL
66
+ ```bash
67
+ claude mcp add --transport http mailkite https://mcp.mailkite.dev/mcp
68
+ ```
83
69
 
84
- `messages tail` polls the stored-messages API and prints new arrivals — so you can
85
- confirm an inbound round-trip (send → receive) with no tunnel:
70
+ In Claude Code you can also install the plugin:
86
71
 
87
- ```bash
88
- mailkite messages tail --once --subject "test" --timeout 120 --json
72
+ ```text
73
+ /plugin marketplace add mailkite/claude-code
74
+ /plugin install mailkite@mailkite
89
75
  ```
90
76
 
91
- To verify webhook signatures locally (no network), use `verify-webhook` or the
92
- SDK's `verifyWebhook` helper.
77
+ Any chat/UI agent: *"Add the MCP server at https://mcp.mailkite.dev/mcp and authenticate in the browser when prompted."*
93
78
 
94
- ## Develop
79
+ **Local (static key, offline / CI):**
95
80
 
96
- ```bash
97
- npm install
98
- npm test # drives the commands against a mock API + checks local signature verify
81
+ ```json
82
+ { "mcpServers": { "mailkite": { "command": "npx", "args": ["-y", "@mailkite/mcp"], "env": { "MAILKITE_API_KEY": "mk_live_…" } } } }
99
83
  ```
100
84
 
101
- ## License
102
-
103
- MIT
85
+ **Give an agent its own inbox.** Route inbound mail to a built-in **inbox agent** (the `agent` route action) and it answers, files, or escalates on its own — see [https://mailkite.dev/docs/ai-agents](https://mailkite.dev/docs/ai-agents).
86
+
87
+ ## All MailKite libraries
88
+
89
+ Same contract, every language — pick the one for your stack (full list: [https://mailkite.dev/docs/libraries](https://mailkite.dev/docs/libraries)):
90
+
91
+ | Library | Repo | Distribution |
92
+ | --- | --- | --- |
93
+ | MailKite for Node.js | [`mailkite-node`](https://github.com/mailkite/mailkite-node) | npm |
94
+ | MailKite for Python | [`mailkite-python`](https://github.com/mailkite/mailkite-python) | PyPI |
95
+ | MailKite for Ruby | [`mailkite-ruby`](https://github.com/mailkite/mailkite-ruby) | RubyGems |
96
+ | MailKite for Java | [`mailkite-java`](https://github.com/mailkite/mailkite-java) | Maven Central |
97
+ | MailKite for PHP | [`mailkite-php`](https://github.com/mailkite/mailkite-php) | Packagist |
98
+ | MailKite for Go | [`mailkite-go`](https://github.com/mailkite/mailkite-go) | Go modules |
99
+ | @mailkite/cli **(this repo)** | [`mailkite-cli`](https://github.com/mailkite/mailkite-cli) | npm |
100
+ | @mailkite/mcp | [`mailkite-mcp`](https://github.com/mailkite/mailkite-mcp) | npm |
101
+ | @mailkite/client | [`mailkite-js`](https://github.com/mailkite/mailkite-js) | npm |
102
+ | @mailkite/expo | [`mailkite-expo`](https://github.com/mailkite/mailkite-expo) | npm |
103
+ | MailKiteClient | [`mailkite-swift`](https://github.com/mailkite/mailkite-swift) | Swift Package Manager |
104
+ | dev.mailkite:mailkite-client | [`mailkite-kotlin`](https://github.com/mailkite/mailkite-kotlin) | Maven Central |
105
+ | mailkite_client | [`mailkite-flutter`](https://github.com/mailkite/mailkite-flutter) | pub.dev |
106
+
107
+ ## Docs & links
108
+
109
+ - 📚 **Documentation:** https://mailkite.dev/docs
110
+ - 📦 **This library's guide:** https://mailkite.dev/docs/cli
111
+ - 🤖 **AI agents (MCP + inbox agents):** https://mailkite.dev/docs/ai-agents
112
+ - 🌐 **Website:** https://mailkite.dev
113
+ - 🧭 **All libraries:** https://mailkite.dev/docs/libraries
114
+
115
+ <sub>Generated from the shared MailKite API contract. © MailKite.</sub>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailkite/cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "MailKite command-line client — sign in, add domains, set DNS + webhooks, send mail, and tail inbound messages from your terminal. Built on the MailKite Node SDK.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -34,6 +34,6 @@
34
34
  },
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "mailkite": "^0.8.0"
37
+ "mailkite": "^0.9.0"
38
38
  }
39
39
  }