Curated OpenAPI description for Namecheap's XML API. The real API uses a single
endpoint (/xml.response) with a Command query parameter plus Namecheap's
query-string authentication parameters (ApiUser, ApiKey, UserName, ClientIp).
Generation uses command-shaped pseudo paths that are normalized back to /xml.response
by the Namecheap printed CLI patch layer.
Quick Start
1. Install
See Install above.
2. Set Up Credentials
Get your API key from your API provider's developer portal. The key typically looks like a long alphanumeric string.
export NAMECHEAP_API_KEY="<paste-your-key>"
You can also persist this in your config file at ~/.config/namecheap-pp-cli/config.toml.
3. Verify Setup
namecheap-pp-cli doctor
This checks your configuration and credentials.
4. Try Your First Command
namecheap-pp-cli dns get-email-forwarding
Usage
Run namecheap-pp-cli --help for the full command reference and flag list.
Commands
dns
Manage dns
namecheap-pp-cli dns get-email-forwarding - Runs namecheap.domains.dns.getEmailForwarding.
namecheap-pp-cli dns get-hosts - Runs namecheap.domains.dns.getHosts.
namecheap-pp-cli dns get-list - Get DNS nameserver type and nameservers.
namecheap-pp-cli dns set-custom - Runs namecheap.domains.dns.setCustom.
namecheap-pp-cli dns set-default - Switch a domain to Namecheap default DNS.
namecheap-pp-cli dns set-hosts - Runs namecheap.domains.dns.setHosts; HostName1/RecordType1/Address1/TTL1 style parameters can be passed via --param-json in the patched CLI.
domains
Manage domains
namecheap-pp-cli domains check - Check domain availability for one or more domains.
namecheap-pp-cli domains create - Runs namecheap.domains.create. This is a mutating paid operation; use dry-run unless intentionally registering.
namecheap-pp-cli domains get-contacts - Runs namecheap.domains.getContacts.
namecheap-pp-cli domains get-info - Runs namecheap.domains.getInfo for a domain.
namecheap-pp-cli domains get-list - Runs namecheap.domains.getList with paging and optional filters.
namecheap-pp-cli domains get-registrar-lock - Runs namecheap.domains.getRegistrarLock.
namecheap-pp-cli domains get-tld-list - Runs namecheap.domains.getTldList.
namecheap-pp-cli domains renew - Runs namecheap.domains.renew. Mutating paid operation.
namecheap-pp-cli domains set-registrar-lock - Runs namecheap.domains.setRegistrarLock.
ssl
Manage ssl
namecheap-pp-cli ssl get-info - Get SSL certificate information.
namecheap-pp-cli ssl get-list - Runs namecheap.ssl.getList.
namecheap-pp-cli ssl parse-csr - Parse a certificate signing request.
users
Manage users
namecheap-pp-cli users address-get-info - Runs namecheap.users.address.getInfo.
namecheap-pp-cli users address-get-list - Runs namecheap.users.address.getList.
namecheap-pp-cli users get-balances - Runs namecheap.users.getBalances.
namecheap-pp-cli users get-pricing - Runs namecheap.users.getPricing.
Output Formats
# Human-readable table (default in terminal, JSON when piped)
namecheap-pp-cli dns get-email-forwarding
# JSON for scripting and agents
namecheap-pp-cli dns get-email-forwarding --json
# Filter to specific fields
namecheap-pp-cli dns get-email-forwarding --json --select id,name,status
# Dry run — show the request without sending
namecheap-pp-cli dns get-email-forwarding --dry-run
# Agent mode — JSON + compact + no prompts in one flag
namecheap-pp-cli dns get-email-forwarding --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--json output to stdout, errors to stderr
- Filterable -
--select id,name returns only fields you need
- Previewable -
--dry-run shows the request without sending
- Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
- Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendly is set
Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.
Health Check
namecheap-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ~/.config/namecheap-pp-cli/config.toml
Static request headers can be configured under headers; per-command header overrides take precedence.
Environment variables:
| Name | Kind | Required | Description |
|---|
NAMECHEAP_API_KEY | per_call | Yes | Set to your API credential. |
Troubleshooting
Authentication errors (exit code 4)
- Run
namecheap-pp-cli doctor to check credentials
- Verify the environment variable is set:
echo $NAMECHEAP_API_KEY
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
list command to see available items
Generated by CLI Printing Press