High-Performance Native CLI & Agent Tool for Namecheap
Blazing fast, zero-dependency Rust CLI for Namecheap API. Query domain availability, configure DNS host records, inspect registrations, and detect client IPs with JSON output support.
$ namecheap-cli login --api-user spacecorps --api-key $NC_KEY --client-ip 203.0.113.1
✓ Credentials saved to ~/.config/namecheap-cli/config.json
# 2. Check domain availability in milliseconds
$ namecheap-cli domains check spacecorps.dev agentcorp.ai
DOMAIN AVAILABLE IS_PREMIUM PRICE
spacecorps.dev false false -
agentcorp.ai true false $69.98
# 3. List DNS host records with JSON output for AI agents
$ namecheap-cli dns list --domain spacecorps.dev --json | jq '.[0]'
{
"name": "@",
"type": "A",
"address": "185.199.108.153",
"ttl": 300
}
Why Namecheap CLI?
Native Sub-Millisecond Speed
Engineered in memory-safe Rust with zero runtime dependencies. Instantaneous command startup without JVM, Python, or Node.js lag.
Autonomous Agent Ready
Deterministic JSON output mode (--json) across all commands makes it seamless for LLMs and autonomous agents to automate DNS records.
Automatic IP Detection
Namecheap enforces strict IP whitelisting. Use namecheap-cli ip to automatically detect your public egress IP for instant authorization.
Secure Authentication
Support for standard interactive login, configuration profiles, environment variables, or granular CLI flags for headless CI/CD runs.
Batch Domain Checking
Verify availability and premium prices for dozens of domains in parallel with a single, highly concurrent API call.
Full DNS Control
Inspect, append, and replace A, AAAA, CNAME, MX, and TXT host records with safety verification and TTL controls.
Command Reference
| Command | Description | Agent JSON |
|---|---|---|
login |
Save API user, API key, and client IP to local configuration file | Supported |
ip |
Detect public IP address to add to Namecheap API whitelist | --json |
domains check <DOMAINS...> |
Check availability and premium pricing for one or more domains | --json |
domains list |
List registered domains with pagination, search, and sorting | --json |
domains info --domain <DOMAIN> |
Inspect nameservers, WhoisGuard, and expiration dates | --json |
dns list --domain <DOMAIN> |
List all active DNS host records (A, CNAME, TXT, MX) | --json |
dns add-host --domain <DOMAIN> |
Add a new DNS record with type, host, address, and TTL | --json |
config show / set |
View or update stored credentials and sandbox preferences | --json |
Installation
Build and install directly using Cargo:
cargo install --git https://github.com/SpaceCorps/namecheap-cli.git
Or clone and build from source:
git clone https://github.com/SpaceCorps/namecheap-cli.git cd namecheap-cli cargo build --release ./target/release/namecheap-cli --help