@nuntly/cli 1.0.0-alpha.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/LICENSE +21 -0
- package/README.md +230 -0
- package/bin/nuntly.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1254 -0
- package/dist/index.js.map +1 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nuntly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# @nuntly/cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nuntly/cli)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
|
|
6
|
+
Command-line interface for [Nuntly](https://nuntly.com), the developer-first email platform. Send emails, manage domains, webhooks, inboxes, and more from your terminal.
|
|
7
|
+
|
|
8
|
+
[Documentation](https://nuntly.com/docs) | [API Reference](https://nuntly.com/docs/api) | [Get your API key](https://nuntly.com/auth/sign-up)
|
|
9
|
+
|
|
10
|
+
## Table of contents
|
|
11
|
+
|
|
12
|
+
- [Requirements](#requirements)
|
|
13
|
+
- [Installation](#installation)
|
|
14
|
+
- [Authentication](#authentication)
|
|
15
|
+
- [Quick start](#quick-start)
|
|
16
|
+
- [Commands](#commands)
|
|
17
|
+
- [Output formats](#output-formats)
|
|
18
|
+
- [Delete confirmation](#delete-confirmation)
|
|
19
|
+
- [FAQ](#faq)
|
|
20
|
+
- [Semantic versioning](#semantic-versioning)
|
|
21
|
+
- [Contributing](#contributing)
|
|
22
|
+
- [License](#license)
|
|
23
|
+
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
- macOS, Linux, or Windows on x64 or arm64
|
|
27
|
+
- For the npm install path: Node.js 20 or later (or Bun)
|
|
28
|
+
- For the standalone binary install path: no runtime required, the binary embeds the JavaScript runtime
|
|
29
|
+
- A Nuntly API key from [https://nuntly.com/auth/sign-up](https://nuntly.com/auth/sign-up)
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### One-liner (macOS / Linux)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
curl -fsSL https://raw.githubusercontent.com/nuntly/nuntly-cli/main/scripts/install.sh | bash
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Detects your OS and architecture, downloads the matching binary from GitHub Releases, verifies its SHA-256 checksum, and installs to `~/.nuntly/bin`.
|
|
40
|
+
|
|
41
|
+
Pin a specific version:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
curl -fsSL https://raw.githubusercontent.com/nuntly/nuntly-cli/main/scripts/install.sh | bash -s -- --version v1.2.3
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### One-liner (Windows PowerShell)
|
|
48
|
+
|
|
49
|
+
```powershell
|
|
50
|
+
irm https://raw.githubusercontent.com/nuntly/nuntly-cli/main/scripts/install.ps1 | iex
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Installs `nuntly.exe` to `%USERPROFILE%\.nuntly\bin` and adds it to your user `PATH`.
|
|
54
|
+
|
|
55
|
+
### Homebrew (macOS / Linux)
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
brew install nuntly/tap/nuntly
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### npm (requires Node.js 18+ or Bun)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install -g @nuntly/cli
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### npx (no install)
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx @nuntly/cli emails list
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Standalone binary (no runtime required)
|
|
74
|
+
|
|
75
|
+
Download the binary for your platform from [GitHub Releases](https://github.com/nuntly/nuntly-cli/releases):
|
|
76
|
+
|
|
77
|
+
| Platform | Binary |
|
|
78
|
+
|----------|--------|
|
|
79
|
+
| macOS ARM (M1/M2/M3) | `nuntly-darwin-arm64` |
|
|
80
|
+
| macOS Intel | `nuntly-darwin-x64` |
|
|
81
|
+
| Linux x64 | `nuntly-linux-x64` |
|
|
82
|
+
| Linux ARM | `nuntly-linux-arm64` |
|
|
83
|
+
| Windows x64 | `nuntly-windows-x64.exe` |
|
|
84
|
+
|
|
85
|
+
Each binary ships with a matching `.sha256` checksum file.
|
|
86
|
+
|
|
87
|
+
### Docker
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
docker run --rm -e NUNTLY_API_KEY=your-key ghcr.io/nuntly/cli emails list
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Authentication
|
|
94
|
+
|
|
95
|
+
### Interactive login (recommended)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
nuntly login
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Saves your API key to `~/.nuntly/config.json` (chmod 600).
|
|
102
|
+
|
|
103
|
+
### Environment variable
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
export NUNTLY_API_KEY=your-api-key
|
|
107
|
+
nuntly emails list
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Per-command flag
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
nuntly --api-key your-key emails list
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Priority: `--api-key` flag > `NUNTLY_API_KEY` env var > `~/.nuntly/config.json`
|
|
117
|
+
|
|
118
|
+
## Quick start
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Login
|
|
122
|
+
nuntly login
|
|
123
|
+
|
|
124
|
+
# Send an email
|
|
125
|
+
nuntly emails send \
|
|
126
|
+
--from hello@yourcompany.com \
|
|
127
|
+
--to user@example.com \
|
|
128
|
+
--subject "Welcome" \
|
|
129
|
+
--html "<h1>Welcome!</h1>"
|
|
130
|
+
|
|
131
|
+
# List sent emails
|
|
132
|
+
nuntly emails list
|
|
133
|
+
|
|
134
|
+
# Get email details
|
|
135
|
+
nuntly emails retrieve em_01ka8k8s80gvx9604cn9am5st4
|
|
136
|
+
|
|
137
|
+
# Add a domain
|
|
138
|
+
nuntly domains create --name example.com --sending
|
|
139
|
+
|
|
140
|
+
# Create a webhook
|
|
141
|
+
nuntly webhooks create \
|
|
142
|
+
--endpoint-url https://example.com/hooks \
|
|
143
|
+
--events email.delivered,email.bounced
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Commands
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
nuntly login Save API key
|
|
150
|
+
nuntly emails send [options] Send an email
|
|
151
|
+
nuntly emails list [options] List sent emails
|
|
152
|
+
nuntly emails retrieve <id> Get email details
|
|
153
|
+
nuntly emails cancel <id> Cancel scheduled email
|
|
154
|
+
nuntly emails stats retrieve Get sending statistics
|
|
155
|
+
nuntly emails events list <id> Get email event history
|
|
156
|
+
nuntly emails content retrieve <id> Get email content URLs
|
|
157
|
+
nuntly emails bulk send [options] Send bulk emails
|
|
158
|
+
nuntly domains create [options] Add a domain
|
|
159
|
+
nuntly domains list List domains
|
|
160
|
+
nuntly domains retrieve <id> Get domain details
|
|
161
|
+
nuntly domains update <id> [options] Update domain settings
|
|
162
|
+
nuntly domains delete <id> Remove a domain
|
|
163
|
+
nuntly webhooks create [options] Register webhook endpoint
|
|
164
|
+
nuntly webhooks list List webhooks
|
|
165
|
+
nuntly webhooks retrieve <id> Get webhook details
|
|
166
|
+
nuntly webhooks update <id> [options] Update webhook
|
|
167
|
+
nuntly webhooks delete <id> Remove webhook
|
|
168
|
+
nuntly api-keys create [options] Generate API key
|
|
169
|
+
nuntly api-keys list List API keys
|
|
170
|
+
nuntly api-keys delete <id> Revoke API key
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Run `nuntly <command> --help` for details on any command.
|
|
174
|
+
|
|
175
|
+
## Output formats
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Default: pretty-printed JSON
|
|
179
|
+
nuntly emails retrieve em_123
|
|
180
|
+
|
|
181
|
+
# Compact JSON (for piping to jq)
|
|
182
|
+
nuntly emails list --json | jq '.data[].id'
|
|
183
|
+
|
|
184
|
+
# ID only (for scripting)
|
|
185
|
+
nuntly emails send ... --quiet
|
|
186
|
+
# em_01ka8k8s80gvx9604cn9am5st4
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Delete confirmation
|
|
190
|
+
|
|
191
|
+
All delete commands require interactive confirmation:
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
$ nuntly domains delete dns_01ka8k8s80gvx9604cn9am5st4
|
|
195
|
+
? Delete domains dns_01ka8k8s80gvx9604cn9am5st4? (Y/n)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## FAQ
|
|
199
|
+
|
|
200
|
+
**Which install path should I pick?**
|
|
201
|
+
The standalone binary (Homebrew or one-liner) is the simplest: no runtime to install, no dependency conflicts. Pick the npm install if you already use Node.js or Bun in CI and want to pin a version per project.
|
|
202
|
+
|
|
203
|
+
**How do I use a custom API base URL?**
|
|
204
|
+
Set `NUNTLY_BASE_URL` in the environment, or use the per-profile `baseUrl` option in `~/.nuntly/config.json`.
|
|
205
|
+
|
|
206
|
+
**Why does `nuntly --help` open in less?**
|
|
207
|
+
Commander.js paginates long help output. Pipe through `cat` (`nuntly --help | cat`) or set `PAGER=cat` to disable pagination.
|
|
208
|
+
|
|
209
|
+
**How do I report a bug?**
|
|
210
|
+
Open an issue at [github.com/nuntly/nuntly-cli/issues](https://github.com/nuntly/nuntly-cli/issues) with the output of `nuntly --version`, the command you ran, and the error message.
|
|
211
|
+
|
|
212
|
+
## Semantic versioning
|
|
213
|
+
|
|
214
|
+
This CLI follows [Semantic Versioning 2.0](https://semver.org). Pre-1.0 versions (alpha, beta) may include breaking command changes between minor versions.
|
|
215
|
+
|
|
216
|
+
After `1.0.0`:
|
|
217
|
+
|
|
218
|
+
- **Major** version bumps signal breaking command, flag, or output changes
|
|
219
|
+
- **Minor** version bumps add new commands, flags, or output formats backwards-compatibly
|
|
220
|
+
- **Patch** version bumps include backwards-compatible fixes
|
|
221
|
+
|
|
222
|
+
The CLI version tracks the underlying Nuntly SDK version closely.
|
|
223
|
+
|
|
224
|
+
## Contributing
|
|
225
|
+
|
|
226
|
+
Issues, bug reports, and feature requests are welcome at [github.com/nuntly/nuntly-cli/issues](https://github.com/nuntly/nuntly-cli/issues). Command surfaces are generated from the Nuntly OpenAPI spec, so direct PRs that modify them will likely be redirected to upstream feedback. Documentation, examples, and developer-experience improvements are the highest-impact contribution areas.
|
|
227
|
+
|
|
228
|
+
## License
|
|
229
|
+
|
|
230
|
+
MIT. See [LICENSE](./LICENSE).
|
package/bin/nuntly.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|