resend-cli 1.3.0 → 1.4.1
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 +40 -14
- package/dist/cli.cjs +292 -223
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -15,24 +15,32 @@ Built for humans, AI agents, and CI/CD pipelines.
|
|
|
15
15
|
|
|
16
16
|
## Install
|
|
17
17
|
|
|
18
|
-
###
|
|
18
|
+
### cURL
|
|
19
19
|
|
|
20
|
-
```
|
|
21
|
-
|
|
20
|
+
```sh
|
|
21
|
+
curl -fsSL https://resend.com/install.sh | bash
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
###
|
|
24
|
+
### Node.js
|
|
25
25
|
|
|
26
|
-
```
|
|
27
|
-
|
|
26
|
+
```sh
|
|
27
|
+
npm install -g resend-cli
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### Homebrew (macOS / Linux)
|
|
31
31
|
|
|
32
|
-
```
|
|
33
|
-
|
|
32
|
+
```sh
|
|
33
|
+
brew install resend/cli/resend
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### PowerShell (Windows)
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
irm https://resend.com/install.ps1 | iex
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or download the `.exe` directly from the [GitHub releases page](https://github.com/resend/resend-cli/releases/latest).
|
|
43
|
+
|
|
36
44
|
## Local development
|
|
37
45
|
|
|
38
46
|
Use this when you want to change the CLI and run your build locally.
|
|
@@ -53,13 +61,13 @@ Use this when you want to change the CLI and run your build locally.
|
|
|
53
61
|
2. **Install dependencies**
|
|
54
62
|
|
|
55
63
|
```bash
|
|
56
|
-
|
|
64
|
+
pnpm install
|
|
57
65
|
```
|
|
58
66
|
|
|
59
67
|
3. **Build locally**
|
|
60
68
|
|
|
61
69
|
```bash
|
|
62
|
-
|
|
70
|
+
pnpm build
|
|
63
71
|
```
|
|
64
72
|
|
|
65
73
|
Output: `./dist/cli.cjs`
|
|
@@ -69,7 +77,7 @@ Use this when you want to change the CLI and run your build locally.
|
|
|
69
77
|
Use the dev script:
|
|
70
78
|
|
|
71
79
|
```bash
|
|
72
|
-
|
|
80
|
+
pnpm dev -- --version
|
|
73
81
|
```
|
|
74
82
|
|
|
75
83
|
Or run the built JS bundle:
|
|
@@ -83,7 +91,7 @@ node dist/cli.cjs --version
|
|
|
83
91
|
After editing source files, rebuild:
|
|
84
92
|
|
|
85
93
|
```bash
|
|
86
|
-
|
|
94
|
+
pnpm build
|
|
87
95
|
```
|
|
88
96
|
|
|
89
97
|
### Building native binaries
|
|
@@ -91,7 +99,7 @@ npm run build
|
|
|
91
99
|
To build a standalone native binary:
|
|
92
100
|
|
|
93
101
|
```bash
|
|
94
|
-
|
|
102
|
+
pnpm build:bin
|
|
95
103
|
```
|
|
96
104
|
|
|
97
105
|
Output: `./dist/resend`
|
|
@@ -182,6 +190,22 @@ resend login --key re_xxx --json
|
|
|
182
190
|
| `invalid_key_format` | Key does not start with `re_` |
|
|
183
191
|
| `validation_failed` | Resend API rejected the key |
|
|
184
192
|
|
|
193
|
+
#### Switch between teams and accounts
|
|
194
|
+
|
|
195
|
+
If you work across multiple Resend teams or accounts, the CLI handles that too.
|
|
196
|
+
|
|
197
|
+
Switch between profiles without logging in and out:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
resend auth switch
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
You can also use the global `--profile` (or `-p`) flag on any command to run it with a specific profile.
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
resend domains list --profile production
|
|
207
|
+
```
|
|
208
|
+
|
|
185
209
|
---
|
|
186
210
|
|
|
187
211
|
### `resend emails send`
|
|
@@ -375,7 +399,9 @@ resend [global options] <command> [command options]
|
|
|
375
399
|
| Flag | Description |
|
|
376
400
|
|------|-------------|
|
|
377
401
|
| `--api-key <key>` | Override API key for this invocation (takes highest priority) |
|
|
402
|
+
| `-p, --profile <name>` | Profile to use (overrides `RESEND_PROFILE` env var) |
|
|
378
403
|
| `--json` | Force JSON output even in interactive terminals |
|
|
404
|
+
| `-q, --quiet` | Suppress spinners and status output (implies `--json`) |
|
|
379
405
|
| `--version` | Print version and exit |
|
|
380
406
|
| `--help` | Show help text |
|
|
381
407
|
|