unhuman
v0.2.3
Published
CLI for unhumans
Readme
unhuman
CLI for unhumans.
Quick Start
# Coffee
npx unhuman coffee catalog
# Domains
npx unhuman domains search myprojectInstall
npm install -g unhumanOr use directly with npx — no install needed.
Products & Commands
The unhuman CLI is organized by product. Each product has its own command group:
- Coffee:
unhuman coffee - Domains:
unhuman domains - More products will appear as the platform expands.
Coffee
Order coffee via unhuman coffee.
Catalog
List available blends and SKUs.
unhuman coffee catalog
unhuman coffee catalog --jsonBuy
Place a coffee order with Lightning payment. You provide a SKU from the catalog and a shipping address.
# Example address JSON file
cat > /tmp/address.json <<'JSON'
{
"firstName": "Ada",
"lastName": "Lovelace",
"address1": "123 Machine St",
"address2": "Suite 4",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
JSON
# Manual payment — shows invoice, prompts for preimage
unhuman coffee buy --sku COF-WHB-12O-COL-BOX --quantity 1 --address-file /tmp/address.json
# Inline JSON address
unhuman coffee buy --sku COF-GND-12O-RCK-BOX --address-json '{
"firstName": "Ada",
"lastName": "Lovelace",
"address1": "123 Machine St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}'
# Auto-pay with agent-wallet
unhuman coffee buy --sku COF-WHB-12O-CSD-BOX --address-file /tmp/address.json --walletDomains
All domain operations live under unhuman domains.
Search
Search domain availability across all supported TLDs (com, net, org, io, dev, app, xyz, co, ai).
unhuman domains search coolproject
unhuman domains search coolproject --tld com,dev
unhuman domains search coolproject --jsonRegister
Register a domain. Initiates a Lightning payment flow.
--email is required — ICANN sends a verification link to this address.
Failure to verify will result in domain suspension.
# Manual payment — shows invoice, prompts for preimage
unhuman domains register coolproject.dev --email [email protected]
# Auto-pay with agent-wallet (no human interaction)
unhuman domains register coolproject.dev --email [email protected] --walletOn success, your management token is saved to ~/.unhuman/tokens.json.
Info
Get domain information (expiry, status, nameservers).
unhuman domains info coolproject.dev
unhuman domains info coolproject.dev --jsonDNS
List and manage DNS records.
# List records
unhuman domains dns coolproject.dev
# Set records (replaces entire zone)
unhuman domains dns set coolproject.dev --records '[
{"type": "A", "subdomain": "@", "ip": "76.76.21.21"},
{"type": "CNAME", "subdomain": "www", "target": "cname.vercel-dns.com"}
]'⚠️
dns setreplaces all records. Read existing records first withdns <domain>if you want to add to them.
Nameservers
Delegate to external nameservers.
unhuman domains nameservers coolproject.dev ns1.example.com ns2.example.comSwitch back to OpenSRS default nameservers (re-enables DNS management):
unhuman domains nameservers coolproject.dev --use-defaultRenew
Renew a domain registration. Same Lightning payment flow.
unhuman domains renew coolproject.dev
unhuman domains renew coolproject.dev --period 2
unhuman domains renew coolproject.dev --walletRecover
Recover a lost management token (requires email was set during registration).
# Request recovery code
unhuman domains recover coolproject.dev --email [email protected]
# Confirm with code from email
unhuman domains recover coolproject.dev --email [email protected] --code 123456Tokens
List all stored management tokens.
unhuman domains tokens
unhuman domains tokens --jsonAgent-Wallet Integration
agent-wallet is a self-custodial Bitcoin Lightning wallet built for AI agents. The --wallet flag on register and renew uses it for fully autonomous operation:
- CLI initiates registration/renewal → gets Lightning invoice
- Pays via agent-wallet (
npx @moneydevkit/agent-wallet send <invoice>) - Extracts preimage from payment
- Completes registration with proof of payment
No human interaction needed. Perfect for AI agents.
# Set up agent-wallet (one-time)
npx @moneydevkit/agent-wallet init
# One command, fully autonomous domain registration
unhuman domains register my-agent.dev --email [email protected] --walletLogging
The CLI always writes a JSONL log file to:
~/.unhuman/unhuman.log
Logs include request/response bodies and payment artifacts (macaroon, preimage, tokens) to aid debugging. The file is created with 0600 permissions. You can adjust logging per-run:
unhuman domains register example.dev --email [email protected] --wallet --log-level debug
unhuman domains register example.dev --email [email protected] --wallet --log-file /tmp/unhuman.logEnvironment variables:
UNHUMAN_LOG_LEVEL=debug
UNHUMAN_LOG_FILE=/tmp/unhuman.log
UNHUMAN_LOG_SECRETS=1Learn more: https://docs.moneydevkit.com/agent-wallet
Token Management
Management tokens are stored at ~/.unhuman/tokens.json:
{
"coolproject.dev": {
"token": "eyJhbGciOi...",
"email": "[email protected]",
"registeredAt": "2025-01-01T00:00:00.000Z"
}
}Tokens are JWTs valid for 1 year. They're automatically loaded for management commands (info, dns, nameservers, renew).
If you lose a token, use unhuman domains recover with the email you registered with.
JSON Output
All commands support --json for machine-readable output:
unhuman domains search myproject --json | jq '.results[] | select(.available)'API
Powered by the unhuman.domains API and the unhuman.coffee API. See the full API docs at unhuman.domains/llms.txt and unhuman.coffee/llms.txt.
License
MIT
