@mailkite/cli 0.6.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.
- package/README.md +88 -71
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -1,98 +1,115 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
11
28
|
|
|
12
29
|
```bash
|
|
13
|
-
npx @mailkite/cli --help
|
|
14
|
-
npm i -g @mailkite/cli
|
|
30
|
+
npx @mailkite/cli --help # no install
|
|
31
|
+
npm i -g @mailkite/cli # or install the `mailkite` binary globally
|
|
15
32
|
```
|
|
16
33
|
|
|
17
|
-
##
|
|
34
|
+
## Quickstart
|
|
18
35
|
|
|
19
36
|
```bash
|
|
20
|
-
mailkite
|
|
21
|
-
mailkite domains
|
|
22
|
-
mailkite domains
|
|
23
|
-
mailkite domains add mail.myapp.ai # or add a domain you already own
|
|
24
|
-
# …add those records at your DNS provider…
|
|
25
|
-
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
|
|
26
40
|
mailkite webhook set <domainId> https://myapp.ai/hooks/mailkite
|
|
27
41
|
mailkite send --from hello@mail.myapp.ai --to you@example.com \
|
|
28
42
|
--subject "It works" --html "<p>Hi from MailKite</p>"
|
|
29
|
-
mailkite messages tail
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Or do the whole flow in one command:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
mailkite init --email you@example.com --password •••• \
|
|
36
|
-
--domain mail.myapp.ai --provider cloudflare \
|
|
37
|
-
--webhook https://myapp.ai/hooks/mailkite --to you@example.com --verify
|
|
43
|
+
mailkite messages tail # watch inbound arrive
|
|
38
44
|
```
|
|
39
45
|
|
|
40
|
-
##
|
|
46
|
+
## Commands
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
appear as a fallback on an interactive TTY. Missing a required flag in a
|
|
44
|
-
non-TTY context fails loudly instead of hanging.
|
|
45
|
-
- **`--json` everywhere** for machine-readable output.
|
|
46
|
-
- **Snappy.** Commands exit immediately when done.
|
|
48
|
+
Full command reference: **https://mailkite.dev/docs/cli**. Common flows:
|
|
47
49
|
|
|
48
50
|
```bash
|
|
49
|
-
|
|
50
|
-
mailkite domains
|
|
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
|
|
51
58
|
```
|
|
52
59
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
| Group | Commands |
|
|
56
|
-
| --- | --- |
|
|
57
|
-
| Auth | `login`, `signup`, `logout`, `whoami` |
|
|
58
|
-
| Send | `send`, `agent`, `route` |
|
|
59
|
-
| Domains | `domains list\|add\|get\|verify\|rm`, `dns <id> [--provider]` |
|
|
60
|
-
| Webhooks | `webhook set\|rm\|test\|show`, `secret get\|rotate`, `verify-webhook` |
|
|
61
|
-
| Receiving | `messages list\|get\|tail`, `routes list\|create`, `deliveries retry` |
|
|
62
|
-
| Workflow | `init` (setup wizard), `mcp` (run the MCP server) |
|
|
63
|
-
|
|
64
|
-
Run `mailkite <command> --help` or just `mailkite` for the full reference.
|
|
65
|
-
|
|
66
|
-
## Auth & config
|
|
67
|
-
|
|
68
|
-
The CLI uses **one bearer token** for everything (sending and management) — the
|
|
69
|
-
account token from `login`/`signup`. Resolution order:
|
|
60
|
+
## Use it from an AI agent — MCP + Agent connectors
|
|
70
61
|
|
|
71
|
-
|
|
72
|
-
2. `MAILKITE_API_KEY` / `MAILKITE_TOKEN` env
|
|
73
|
-
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)**.
|
|
74
63
|
|
|
75
|
-
|
|
64
|
+
**Hosted (recommended) — one-click OAuth, no key to copy:**
|
|
76
65
|
|
|
77
|
-
|
|
66
|
+
```bash
|
|
67
|
+
claude mcp add --transport http mailkite https://mcp.mailkite.dev/mcp
|
|
68
|
+
```
|
|
78
69
|
|
|
79
|
-
|
|
80
|
-
confirm an inbound round-trip (send → receive) with no tunnel:
|
|
70
|
+
In Claude Code you can also install the plugin:
|
|
81
71
|
|
|
82
|
-
```
|
|
83
|
-
|
|
72
|
+
```text
|
|
73
|
+
/plugin marketplace add mailkite/claude-code
|
|
74
|
+
/plugin install mailkite@mailkite
|
|
84
75
|
```
|
|
85
76
|
|
|
86
|
-
|
|
87
|
-
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."*
|
|
88
78
|
|
|
89
|
-
|
|
79
|
+
**Local (static key, offline / CI):**
|
|
90
80
|
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
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_…" } } } }
|
|
94
83
|
```
|
|
95
84
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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.
|
|
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": {
|
|
@@ -30,11 +30,10 @@
|
|
|
30
30
|
"homepage": "https://mailkite.dev/docs/cli",
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/mailkite/mailkite.git"
|
|
34
|
-
"directory": "sdks/cli"
|
|
33
|
+
"url": "git+https://github.com/mailkite/mailkite-cli.git"
|
|
35
34
|
},
|
|
36
35
|
"license": "MIT",
|
|
37
36
|
"dependencies": {
|
|
38
|
-
"mailkite": "^0.
|
|
37
|
+
"mailkite": "^0.9.0"
|
|
39
38
|
}
|
|
40
39
|
}
|