groundmail-cli 0.0.0-stage → 0.16.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 +74 -2
- package/dist/chunk-4SSJDDBV.js +9 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +3495 -0
- package/dist/react-IXBRBSFN.js +1453 -0
- package/package.json +49 -4
package/README.md
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# groundmail-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command-line client for [Groundmail](https://groundmail.dev) — send transactional email and manage domains, webhooks, templates, and more from the terminal.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g groundmail-cli
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
groundmail login
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`login` prints a link and a short code. Approve the code in the browser, review the
|
|
14
|
+
scopes, pick the workspace, and the CLI signs in with OAuth: a one-hour access token
|
|
15
|
+
that refreshes on its own, and a refresh token kept in your OS keychain (macOS Keychain,
|
|
16
|
+
Windows Credential Manager, Secret Service; a file readable only by you when there is no
|
|
17
|
+
keychain). It works over SSH and from coding agents too: without a terminal it prints the
|
|
18
|
+
link and exits, and running `groundmail login` again after you approve finishes the sign-in.
|
|
19
|
+
|
|
20
|
+
Ask for less than full access with `--scope`, and hand short-lived tokens to scripts:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
groundmail login --scope emails:send,domains:read
|
|
24
|
+
curl -H "Authorization: Bearer $(groundmail auth token --scope emails:send)" https://api.groundmail.dev/emails
|
|
25
|
+
groundmail logout # revokes the sign-in on the server
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
See and revoke every signed-in CLI and agent in the dashboard under **Settings → CLIs & agents**.
|
|
29
|
+
|
|
30
|
+
Or set a key yourself (CI; it wins over a saved sign-in):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
export GROUNDMAIL_API_KEY=gm_your_key_here
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
groundmail emails send \
|
|
38
|
+
--from ops@yourdomain.com \
|
|
39
|
+
--to user@example.com \
|
|
40
|
+
--subject 'Your receipt' \
|
|
41
|
+
--html '<p>Thanks for your purchase.</p>'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Or without a global install:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx groundmail-cli emails send --from … --to … --subject … --html …
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Common commands
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
groundmail whoami
|
|
54
|
+
groundmail auth token [--scope emails:send]
|
|
55
|
+
groundmail workspaces list
|
|
56
|
+
groundmail workspaces use <name>
|
|
57
|
+
groundmail domains list
|
|
58
|
+
groundmail domains verify example.com
|
|
59
|
+
groundmail webhooks list
|
|
60
|
+
groundmail emails list
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Run `groundmail --help` or `groundmail <command> --help` for flags.
|
|
64
|
+
|
|
65
|
+
## Docs
|
|
66
|
+
|
|
67
|
+
- CLI: https://docs.groundmail.dev/cli
|
|
68
|
+
- Quickstart: https://docs.groundmail.dev/quickstart
|
|
69
|
+
- Domains API / CLI: https://docs.groundmail.dev/api/domains
|
|
70
|
+
- Agent skills (CLI): https://docs.groundmail.dev/ai/agent-skills
|
|
71
|
+
- Product: https://groundmail.dev
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
4
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
__commonJS
|
|
9
|
+
};
|
package/dist/cli.d.ts
ADDED