{
  "markdown": "# domani\n\nDomains and email - for humans and AI agents.\n\nRegister domains, manage DNS, create mailboxes, send and receive email. From your terminal, your agent, or the web.\n\n[![npm version](https://img.shields.io/npm/v/domani-cli.svg)](https://www.npmjs.com/package/domani-cli)\n[![license](https://img.shields.io/npm/l/domani-cli.svg)](https://github.com/gwendall/domani/blob/main/LICENSE)\n\n## How it works\n\ndomani gives you one account and multiple ways in:\n\n- **[Web](https://domani.run)** - Dashboard with a full inbox (compose, reply, threads), DNS editor, domain management\n- **CLI** - This package. Everything the web app does, from your terminal\n- **[MCP Server](https://domani.run/mcp)** - typed tools for Claude Code, Cursor, Codex, and any MCP-compatible agent\n- **[OpenClaw](https://openclaw.com)** - `openclaw skills install @gwendall/domani`\n- **[Agent Skill](https://domani.run/skill.md)** - Step-by-step guide your agent can follow. Install with `npx skills add domani.run`\n- **[REST API](https://domani.run/docs)** - Direct HTTP access to everything\n\nAll interfaces share the same API key and the same data.\n\n## Install\n\n```bash\nnpm install -g domani-cli\n```\n\n## Secure MCP bridge\n\nAgent plugins can use Domani without placing an API key in a prompt, shell\nhistory, or editor configuration:\n\n```bash\ndomani login --surface mcp\ndomani mcp serve\n```\n\n`domani login` stores the credential in the operating-system keychain when one\nis available. The stdio bridge resolves it locally and forwards MCP requests to\n`https://domani.run/mcp`; stdout remains reserved for JSON-RPC messages.\n\nFor an agent acting on someone else's behalf, request a scoped, expiring\ncredential instead of their account key:\n\n```bash\ndomani login --scopes domains:read,search --label \"Project agent\" --expires-in 86400\n```\n\nThe approval screen shows the requested access and the resulting credential is\nstored in the keychain without being printed.\n\nAfter login, prove one complete inbound loop before browsing other tools or\nbuying a domain:\n\n```bash\ndomani email create myagent@domani.run\ndomani email webhook myagent@domani.run --url https://my-agent.example/webhook\ndomani email webhook-test myagent@domani.run\n```\n\nUse `--surface plugin`, `--surface skill`, or `--surface api` when that is the\nentry point. This keeps activation attribution consistent without exposing a\ncredential.\n\nThis installs the `domani` command. Or run directly with `npx`:\n\n```bash\nnpx domani-cli search myapp .com .dev .ai\n```\n\n## Quick start\n\n```bash\n# Domain\ndomani search myapp .com .io .dev     # Check availability\ndomani buy myapp.dev                  # Purchase a domain\ndomani connect myapp.dev vercel       # Auto-configure DNS for Vercel\n\n# Email\ndomani email create hello@myapp.dev               # Create hello@myapp.dev\ndomani email send hello@myapp.dev \\\n  --to hi@friend.com --subject \"Hello\" --body \"Sent from my terminal\"\ndomani email forward hello@myapp.dev \\\n  --forward-to me@gmail.com                        # Forward inbound to personal email\n\n# Health\ndomani status myapp.dev               # DNS, SSL, email, expiry check\n```\n\n## Examples\n\n```bash\n# Find available domains with a budget\ndomani search startup --expand --max-price 20\n\n# AI-powered name suggestions\ndomani suggest \"minimalist productivity app\" --style brandable --tlds com,dev,ai\n\n# Buy multiple domains at once\ndomani buy startup.dev startup.ai --yes\n\n# Set up Vercel + Google Workspace in two commands\ndomani connect startup.dev vercel\ndomani connect startup.dev google-workspace\n\n# Full email workflow: create, send, check inbox, forward\ndomani email create hello@startup.dev\ndomani email send hello@startup.dev \\\n  --to investor@vc.com --subject \"Deck\" --body \"Here's our deck.\"\ndomani email inbox hello@startup.dev --direction in\ndomani email forward hello@startup.dev --forward-to me@gmail.com\n\n# Webhook for inbound emails (for bots, support systems, etc.)\n# CURSOR_AUTH contains the complete value, e.g. \"Bearer sender-key\"\ndomani email webhook hello@startup.dev --url https://myapp.dev/hooks/email \\\n  --authorization-env CURSOR_AUTH\ndomani email webhook-test hello@startup.dev\n\n# Provision domain + mailbox + authenticated event webhook in one call.\n# The secret stays in the environment; only its variable name is in argv.\nAGENT_AUTH=\"Bearer sender-key\" domani provision agent.dev \\\n  --webhook https://agent.example/inbox --authorization-env AGENT_AUTH\n\n# Export DNS records before making changes\ndomani dns startup.dev snapshot\ndomani dns startup.dev set TXT @ \"v=spf1 include:_spf.google.com ~all\"\n\n# Pipe to jq (auto-JSON when piped, no --json needed)\ndomani list | jq '.domains[] | {domain, expires_at}'\n\n# Introspect command schemas for agent integration\ndomani schema buy --json\n```\n\n## Commands\n\n### Domains\n\n```\ndomani search <name> [tlds...]    Check availability across TLDs (--expand for 30+)\ndomani suggest <prompt>           AI-powered domain suggestions (--style, --lang, --tlds)\ndomani buy <domains...>           Purchase one or more domains\ndomani adopt <domain>             Inspect and plan a safe connection or transfer\ndomani transfer <domain>          Transfer registration, preserving current nameservers\ndomani renew <domain>             Renew a domain (--years 1-10)\ndomani import <domain>            Import a domain you own elsewhere (DNS monitoring only)\ndomani list                       List your domains\ndomani status <domain>            Health check (DNS, SSL, email, expiry)\ndomani tlds                       List all TLDs with pricing (--sort, --max-price)\ndomani whois <domain>             WHOIS/RDAP lookup\n```\n\n### Email\n\n```\ndomani email list                    List all mailboxes\ndomani email create user@domain      Create a mailbox\ndomani email delete user@domain      Delete a mailbox\ndomani email inbox user@domain       List messages (--folder, --view, --direction)\ndomani email folders user@domain     List folder and view counts\ndomani email archive user@domain --message-ids m1,m2\ndomani email trash user@domain --message-ids m1\ndomani email restore user@domain --message-ids m1\ndomani email read|unread|star|unstar user@domain --message-ids m1,m2\ndomani email send user@domain        Send an email (--to, --subject, --body, --cc, --bcc)\ndomani email forward user@domain     Forward inbound to a personal address (--forward-to)\ndomani email webhook user@domain     Forward inbound as JSON (--url, --authorization-env, --api-key-env, --clear-headers)\ndomani email webhook-test user@domain Deliver one signed test event to the configured webhook\ndomani email setup --domain <domain>       Auto-configure MX, SPF, DKIM, DMARC\ndomani email status --domain <domain>      Check email DNS health\ndomani email connect --domain <domain> <provider>   Connect external provider (Gmail, Fastmail, Proton)\n```\n\n### Mailzero assistant (private preview)\n\n```\ndomani assistant today               Now, Needs you, Waiting, Upcoming, Handled\ndomani assistant settings            Opt-in state, consent, and mailbox scope\ndomani assistant set                 Change settings (--enable, --shadow, --pause, --mailboxes, --none, --days)\ndomani assistant preview             Record consent and start a background history import (--mailboxes, --consent)\ndomani assistant backfill|retry      Follow the import or requeue its terminal failures\ndomani assistant item <id>           One work item with its Decision and options\ndomani assistant choose <id>         Record a decision (--item-version, --decision, --decision-version, --option)\ndomani assistant instruct|snooze|ignore|take-over|correct <id>\ndomani assistant plan <id>           Exact preview of a prepared reply; nothing is sent by the CLI\ndomani assistant activity            Content-free interaction and receipt log\ndomani assistant rules               The standing delegations (match, assignee, level, grants)\ndomani assistant approvals           The plans waiting for you and the questions your agents asked\ndomani assistant suggestions         The rules the assistant proposes from what recurred\ndomani assistant metrics             The seven numbers per account and per rule (--days)\ndomani assistant task <id>           The task envelope an assignee works from\ndomani assistant lease|release|effects|escalate|report <id>\ndomani assistant export|delete       Export or delete derived data (source mail is never touched)\n```\n\nTokens need `assistant:read` for reads and `assistant:write` for changes.\n\n### DNS\n\n```\ndomani dns <domain> get            List all DNS records\ndomani dns <domain> set <type> <name> <value>   Add/update a record\ndomani dns <domain> delete <type> <name>        Remove a record\ndomani dns <domain> snapshot       Export DNS to file\ndomani dns <domain> restore        Restore DNS from snapshot\ndomani nameservers <domain>        Get or set nameservers (--reset for defaults)\ndomani connect <domain> <target>   Auto-configure DNS for a provider\n```\n\n**Supported providers**: Vercel, Netlify, Cloudflare Pages, GitHub Pages, Fly.io, Railway, Render, Google Workspace, Fastmail, Proton Mail.\n\n### Settings\n\n```\ndomani settings <domain>           View/update auto-renew, WHOIS privacy, security lock\ndomani contact [view|set]          Manage WHOIS contact info\ndomani parking <domain>            Manage parking page (enable/disable/price)\ndomani analytics <domain>          View parking analytics\ndomani auth-code <domain>          Get EPP auth code for outbound transfer\ndomani transfer-away <domain>      Check outbound transfer status\n```\n\n### Account\n\n```\ndomani login                       Log in to domani.run (opens browser)\ndomani logout                      Clear saved credentials\ndomani me                          Show account info\ndomani billing                     Add or update payment method (opens browser)\ndomani invoices                    List payment invoices\ndomani token                       Print your API key\ndomani tokens [list|create|revoke] Manage API tokens (scoped, expiring)\ndomani webhooks [action]           Manage webhook endpoints (auth headers via --authorization-env/--api-key-env)\n```\n\n### Introspection\n\n```\ndomani schema [command]            Show command schemas for AI agent integration\ndomani update                      Update to the latest version\ndomani uninstall                   Remove domani CLI and config\n```\n\n## Agent integration\n\nBuilt for AI agents and scripts, not just humans.\n\n**TTY auto-detect**: When stdout is not a terminal, the CLI automatically switches to JSON output and skips confirmation prompts. No `--json` flag needed.\n\n```bash\ndomani list | jq '.domains[].domain'\n```\n\n**Structured errors**: In JSON mode, errors include `code`, `hint`, and `fix_command` for auto-recovery:\n\n```json\n{ \"error\": \"Not logged in\", \"code\": \"auth_required\", \"fix_command\": \"domani login\" }\n```\n\n| Code | Fix | Description |\n|------|-----|-------------|\n| `auth_required` | `domani login` | Not logged in |\n| `payment_required` | `domani billing` | No payment method on file |\n| `contact_required` | `domani contact set` | WHOIS contact info missing |\n| `validation_error` | Read `hint` | Invalid input |\n| `not_found` | - | Domain doesn't exist or not owned |\n| `rate_limited` | Wait `Retry-After` | Too many requests |\n\n**Flags**:\n\n| Flag | Description |\n|------|-------------|\n| `--json` | Force JSON output |\n| `--fields <f>` | Filter JSON fields (comma-separated) |\n| `--dry-run` | Preview mutations without executing |\n| `--yes` | Skip confirmation prompts |\n\n**Input hardening**: All inputs are validated against path traversal, control characters, query strings, and double encoding - common agent hallucinations.\n\n**Schema introspection**: Run `domani schema <command> --json` to get parameter types, constraints, and enums before constructing a command.\n\n## Payments\n\nDomains are charged to your saved card. Add one at [domani.run/dashboard](https://domani.run/dashboard) or with `domani card add`.\n\n```bash\ndomani buy myapp.dev                     # Charged to saved card\n```\n\n## Authentication\n\n| Method | Description |\n|--------|-------------|\n| `domani login` | Interactive login (opens browser) |\n| `$DOMANI_API_KEY` | API key as environment variable |\n| OS keychain | Credential saved by `domani login` when available |\n| `~/.domani/config.json` | Non-secret CLI settings, plus legacy fallback on systems without a keychain |\n\nThe CLI checks `$DOMANI_API_KEY` first, then falls back to `~/.domani/config.json`.\n\n```bash\ndomani login                             # Interactive (opens browser)\nexport DOMANI_API_KEY=domani_sk_...      # Or set env var\n```\n\nScoped API tokens can be created with `domani tokens create --scopes read,dns --expires-in 86400`.\n\n## Environment variables\n\n| Variable | Description |\n|----------|-------------|\n| `DOMANI_API_KEY` | API key (takes precedence over saved config) |\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 12864,
  "sha": "fc5b192a69c670a97f66525fe0dabc6e6caad6e7e081c4ffc07d8eee594342dc",
  "repo_slug": "gwendall/domani",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_run_domani_domani_d65b7867/readme"
}