Agent-native CLI for Cloudflare Registrar domain search, check, and registration.
Created by @danny-shmueli (Danny Shmueli).
Quick Start
1. Install
See Install above.
2. Set Up Credentials
Get your access token from your API provider's developer portal, then store it:
cf-domain-pp-cli auth set-token YOUR_TOKEN_HERE
Or set it via environment variable:
export CLOUDFLARE_REGISTRAR_DOMAINS_BEARER_AUTH="your-token-here"
3. Verify Setup
cf-domain-pp-cli doctor
This checks your configuration and credentials.
4. Try Your First Command
cf-domain-pp-cli registrar domain-check mock-value --domain-name example-resource
Usage
Run cf-domain-pp-cli --help for the full command reference and flag list.
Commands
registrar
Manage registrar
cf-domain-pp-cli registrar domain-check - Real-time domain availability and pricing check. Must be run immediately before registration.
cf-domain-pp-cli registrar domain-register - Register a domain through Cloudflare Registrar using account default registrant/payment settings. Dangerous: caller must confirm exact domain and price before this request.
cf-domain-pp-cli registrar domain-search - Search Cloudflare Registrar for domain suggestions and availability hints. Use domain-check for live final pricing before registering.
Output Formats
# Human-readable table (default in terminal, JSON when piped)
cf-domain-pp-cli registrar domain-check mock-value --domain-name example-resource
# JSON for scripting and agents
cf-domain-pp-cli registrar domain-check mock-value --domain-name example-resource --json
# Filter to specific fields
cf-domain-pp-cli registrar domain-check mock-value --domain-name example-resource --json --select id,name,status
# Dry run — show the request without sending
cf-domain-pp-cli registrar domain-check mock-value --domain-name example-resource --dry-run
# Agent mode — JSON + compact + no prompts in one flag
cf-domain-pp-cli registrar domain-check mock-value --domain-name example-resource --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
- Explicit retries - add
--idempotent to create retries when a no-op success is acceptable
- Confirmable -
--yes for explicit confirmation of destructive actions
- Piped input - write commands can accept structured input when their help lists
--stdin
- 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
cf-domain-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ~/.config/cloudflare-registrar-domains-pp-cli/config.toml
Static request headers can be configured under headers; per-command header overrides take precedence.
Environment variables:
| Name | Kind | Required | Description |
|---|
CLOUDFLARE_REGISTRAR_DOMAINS_BEARER_AUTH | per_call | Yes | Set to your API credential. |
Troubleshooting
Authentication errors (exit code 4)
- Run
cf-domain-pp-cli doctor to check credentials
- Verify the environment variable is set:
echo $CLOUDFLARE_REGISTRAR_DOMAINS_BEARER_AUTH
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