groundmail-cli 0.15.0 → 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 +19 -5
- package/dist/cli.js +1145 -808
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -10,12 +10,24 @@ npm install -g groundmail-cli
|
|
|
10
10
|
groundmail login
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`login` prints a link and a short code. Approve the code in the browser,
|
|
14
|
-
workspace, and the CLI
|
|
15
|
-
|
|
16
|
-
|
|
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.
|
|
17
19
|
|
|
18
|
-
|
|
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):
|
|
19
31
|
|
|
20
32
|
```bash
|
|
21
33
|
export GROUNDMAIL_API_KEY=gm_your_key_here
|
|
@@ -39,6 +51,7 @@ npx groundmail-cli emails send --from … --to … --subject … --html …
|
|
|
39
51
|
|
|
40
52
|
```bash
|
|
41
53
|
groundmail whoami
|
|
54
|
+
groundmail auth token [--scope emails:send]
|
|
42
55
|
groundmail workspaces list
|
|
43
56
|
groundmail workspaces use <name>
|
|
44
57
|
groundmail domains list
|
|
@@ -51,6 +64,7 @@ Run `groundmail --help` or `groundmail <command> --help` for flags.
|
|
|
51
64
|
|
|
52
65
|
## Docs
|
|
53
66
|
|
|
67
|
+
- CLI: https://docs.groundmail.dev/cli
|
|
54
68
|
- Quickstart: https://docs.groundmail.dev/quickstart
|
|
55
69
|
- Domains API / CLI: https://docs.groundmail.dev/api/domains
|
|
56
70
|
- Agent skills (CLI): https://docs.groundmail.dev/ai/agent-skills
|