domani-cli 0.4.14

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 domani.run
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,240 @@
1
+ # domani
2
+
3
+ Domains and email - for humans and AI agents.
4
+
5
+ Register domains, manage DNS, create mailboxes, send and receive email. From your terminal, your agent, or the web.
6
+
7
+ [![npm version](https://img.shields.io/npm/v/domani.svg)](https://www.npmjs.com/package/domani)
8
+ [![license](https://img.shields.io/npm/l/domani.svg)](https://github.com/gwendall/domani/blob/main/LICENSE)
9
+
10
+ ## How it works
11
+
12
+ domani gives you one account and multiple ways in:
13
+
14
+ - **[Web](https://domani.run)** - Dashboard with a full inbox (compose, reply, threads), DNS editor, domain management
15
+ - **CLI** - This package. Everything the web app does, from your terminal
16
+ - **[MCP Server](https://domani.run/mcp)** - 65 tools for Claude Code, Cursor, Windsurf, and any MCP-compatible agent
17
+ - **[OpenClaw](https://openclaw.com)** - `clawhub install domani`
18
+ - **[Agent Skill](https://domani.run/skill.md)** - Step-by-step guide your agent can follow. Install with `npx skills add domani.run`
19
+ - **[REST API](https://domani.run/docs)** - Direct HTTP access to everything
20
+
21
+ All interfaces share the same API key and the same data.
22
+
23
+ ## Install
24
+
25
+ ```bash
26
+ npm install -g domani-cli
27
+ ```
28
+
29
+ This installs the `domani` command. Or run directly with `npx`:
30
+
31
+ ```bash
32
+ npx domani-cli search myapp .com .dev .ai
33
+ ```
34
+
35
+ ## Quick start
36
+
37
+ ```bash
38
+ # Domain
39
+ domani search myapp .com .io .dev # Check availability
40
+ domani buy myapp.dev # Purchase a domain
41
+ domani connect myapp.dev vercel # Auto-configure DNS for Vercel
42
+
43
+ # Email
44
+ domani email create hello@myapp.dev # Create hello@myapp.dev
45
+ domani email send hello@myapp.dev \
46
+ --to hi@friend.com --subject "Hello" --body "Sent from my terminal"
47
+ domani email forward hello@myapp.dev \
48
+ --forward-to me@gmail.com # Forward inbound to personal email
49
+
50
+ # Health
51
+ domani status myapp.dev # DNS, SSL, email, expiry check
52
+ ```
53
+
54
+ ## Examples
55
+
56
+ ```bash
57
+ # Find available domains with a budget
58
+ domani search startup --expand --max-price 20
59
+
60
+ # AI-powered name suggestions
61
+ domani suggest "minimalist productivity app" --style brandable --tlds com,dev,ai
62
+
63
+ # Buy multiple domains at once
64
+ domani buy startup.dev startup.ai --yes
65
+
66
+ # Set up Vercel + Google Workspace in two commands
67
+ domani connect startup.dev vercel
68
+ domani connect startup.dev google-workspace
69
+
70
+ # Full email workflow: create, send, check inbox, forward
71
+ domani email create hello@startup.dev
72
+ domani email send hello@startup.dev \
73
+ --to investor@vc.com --subject "Deck" --body "Here's our deck."
74
+ domani email inbox hello@startup.dev --direction in
75
+ domani email forward hello@startup.dev --forward-to me@gmail.com
76
+
77
+ # Webhook for inbound emails (for bots, support systems, etc.)
78
+ domani email webhook hello@startup.dev --url https://myapp.dev/hooks/email
79
+
80
+ # Export DNS records before making changes
81
+ domani dns startup.dev snapshot
82
+ domani dns startup.dev set TXT @ "v=spf1 include:_spf.google.com ~all"
83
+
84
+ # Pipe to jq (auto-JSON when piped, no --json needed)
85
+ domani list | jq '.domains[] | {domain, expires_at}'
86
+
87
+ # Introspect command schemas for agent integration
88
+ domani schema buy --json
89
+ ```
90
+
91
+ ## Commands
92
+
93
+ ### Domains
94
+
95
+ ```
96
+ domani search <name> [tlds...] Check availability across TLDs (--expand for 30+)
97
+ domani suggest <prompt> AI-powered domain suggestions (--style, --lang, --tlds)
98
+ domani buy <domains...> Purchase one or more domains
99
+ domani transfer <domain> Transfer from another registrar
100
+ domani renew <domain> Renew a domain (--years 1-10)
101
+ domani import <domain> Import a domain you own elsewhere (DNS monitoring only)
102
+ domani list List your domains
103
+ domani status <domain> Health check (DNS, SSL, email, expiry)
104
+ domani tlds List all TLDs with pricing (--sort, --max-price)
105
+ domani whois <domain> WHOIS/RDAP lookup
106
+ ```
107
+
108
+ ### Email
109
+
110
+ ```
111
+ domani email list List all mailboxes
112
+ domani email create user@domain Create a mailbox
113
+ domani email delete user@domain Delete a mailbox
114
+ domani email inbox user@domain List messages (--direction in|out)
115
+ domani email send user@domain Send an email (--to, --subject, --body, --cc, --bcc)
116
+ domani email forward user@domain Forward inbound to a personal address (--forward-to)
117
+ domani email webhook user@domain Forward inbound as JSON to your endpoint (--url)
118
+ domani email setup --domain <domain> Auto-configure MX, SPF, DKIM, DMARC
119
+ domani email status --domain <domain> Check email DNS health
120
+ domani email connect --domain <domain> <provider> Connect external provider (Gmail, Fastmail, Proton)
121
+ ```
122
+
123
+ ### DNS
124
+
125
+ ```
126
+ domani dns <domain> get List all DNS records
127
+ domani dns <domain> set <type> <name> <value> Add/update a record
128
+ domani dns <domain> delete <type> <name> Remove a record
129
+ domani dns <domain> snapshot Export DNS to file
130
+ domani dns <domain> restore Restore DNS from snapshot
131
+ domani nameservers <domain> Get or set nameservers (--reset for defaults)
132
+ domani connect <domain> <target> Auto-configure DNS for a provider
133
+ ```
134
+
135
+ **Supported providers**: Vercel, Netlify, Cloudflare Pages, GitHub Pages, Fly.io, Railway, Render, Google Workspace, Fastmail, Proton Mail.
136
+
137
+ ### Settings
138
+
139
+ ```
140
+ domani settings <domain> View/update auto-renew, WHOIS privacy, security lock
141
+ domani contact [view|set] Manage WHOIS contact info
142
+ domani parking <domain> Manage parking page (enable/disable/price)
143
+ domani analytics <domain> View parking analytics
144
+ domani auth-code <domain> Get EPP auth code for outbound transfer
145
+ domani transfer-away <domain> Check outbound transfer status
146
+ ```
147
+
148
+ ### Account
149
+
150
+ ```
151
+ domani login Log in to domani.run (opens browser)
152
+ domani logout Clear saved credentials
153
+ domani me Show account info
154
+ domani billing Add or update payment method (opens browser)
155
+ domani invoices List payment invoices
156
+ domani token Print your API key
157
+ domani tokens [list|create|revoke] Manage API tokens (scoped, expiring)
158
+ domani webhooks [action] Manage webhook endpoints
159
+ ```
160
+
161
+ ### Introspection
162
+
163
+ ```
164
+ domani schema [command] Show command schemas for AI agent integration
165
+ domani update Update to the latest version
166
+ domani uninstall Remove domani CLI and config
167
+ ```
168
+
169
+ ## Agent integration
170
+
171
+ Built for AI agents and scripts, not just humans.
172
+
173
+ **TTY auto-detect**: When stdout is not a terminal, the CLI automatically switches to JSON output and skips confirmation prompts. No `--json` flag needed.
174
+
175
+ ```bash
176
+ domani list | jq '.domains[].domain'
177
+ ```
178
+
179
+ **Structured errors**: In JSON mode, errors include `code`, `hint`, and `fix_command` for auto-recovery:
180
+
181
+ ```json
182
+ { "error": "Not logged in", "code": "auth_required", "fix_command": "domani login" }
183
+ ```
184
+
185
+ | Code | Fix | Description |
186
+ |------|-----|-------------|
187
+ | `auth_required` | `domani login` | Not logged in |
188
+ | `payment_required` | `domani billing` | No payment method on file |
189
+ | `contact_required` | `domani contact set` | WHOIS contact info missing |
190
+ | `validation_error` | Read `hint` | Invalid input |
191
+ | `not_found` | - | Domain doesn't exist or not owned |
192
+ | `rate_limited` | Wait `Retry-After` | Too many requests |
193
+
194
+ **Flags**:
195
+
196
+ | Flag | Description |
197
+ |------|-------------|
198
+ | `--json` | Force JSON output |
199
+ | `--fields <f>` | Filter JSON fields (comma-separated) |
200
+ | `--dry-run` | Preview mutations without executing |
201
+ | `--yes` | Skip confirmation prompts |
202
+
203
+ **Input hardening**: All inputs are validated against path traversal, control characters, query strings, and double encoding - common agent hallucinations.
204
+
205
+ **Schema introspection**: Run `domani schema <command> --json` to get parameter types, constraints, and enums before constructing a command.
206
+
207
+ ## Payments
208
+
209
+ Domains are charged to your saved card. Add one at [domani.run/dashboard](https://domani.run/dashboard) or with `domani card add`.
210
+
211
+ ```bash
212
+ domani buy myapp.dev # Charged to saved card
213
+ ```
214
+
215
+ ## Authentication
216
+
217
+ | Method | Description |
218
+ |--------|-------------|
219
+ | `domani login` | Interactive login (opens browser) |
220
+ | `$DOMANI_API_KEY` | API key as environment variable |
221
+ | `~/.domani/config.json` | Saved credentials from `domani login` |
222
+
223
+ The CLI checks `$DOMANI_API_KEY` first, then falls back to `~/.domani/config.json`.
224
+
225
+ ```bash
226
+ domani login # Interactive (opens browser)
227
+ export DOMANI_API_KEY=domani_sk_... # Or set env var
228
+ ```
229
+
230
+ Scoped API tokens can be created with `domani tokens create --scopes read,dns --expires-in 86400`.
231
+
232
+ ## Environment variables
233
+
234
+ | Variable | Description |
235
+ |----------|-------------|
236
+ | `DOMANI_API_KEY` | API key (takes precedence over saved config) |
237
+
238
+ ## License
239
+
240
+ [MIT](LICENSE)