CLI Reference
The drs CLI manages DRS nodes via the Cloudflare API. It handles initialization, address management, DNS configuration, and deployment.
Global Options
Most commands require Cloudflare credentials:
| Flag | Description |
|---|---|
--cf-token <token> | Cloudflare API token |
--account-id <id> | Cloudflare account ID |
--kv-namespace <id> | KV namespace ID (for address/config operations) |
--json | Output as JSON (for scripting) |
Commands
drs init
Initialize a new DRS node. Creates DNS records, KV namespaces, and generates an Ed25519 keypair.
drs init --domain mycompany.com --cf-token <token> [--node-type standard|exchange]What it creates:
- KV namespace for addresses
- KV namespace for config
_drs._tcp.mycompany.comSRV record_drskey.mycompany.comTXT record with the public key- Initial node config and manifest in KV
Output: Public key, private key, KV namespace IDs, and next steps.
drs add-address
Add a routable address to the node.
drs add-address <local-part> \ --routes '[{"value_type":"USDC","transfer_type":"ethereum","destination":"0x..."}]' \ --cf-token <token> --account-id <id> --kv-namespace <addresses-id>drs remove-address
Remove an address from the node.
drs remove-address <local-part> \ --cf-token <token> --account-id <id> --kv-namespace <addresses-id>drs list-addresses
List all configured addresses.
drs list-addresses \ --cf-token <token> --account-id <id> --kv-namespace <addresses-id>drs update-config
Update the node’s accepted pairs, pathways, or other configuration.
drs update-config \ --accepts '[{"value_type":"USDC","transfer_type":"ethereum","reference":"0x...","sponsor":"circle.com"}]' \ --cf-token <token> --account-id <id> --kv-namespace <config-id>drs check-dns
Verify that DNS records are correctly configured for a domain.
drs check-dns mycompany.comChecks for:
_drs._tcpSRV record (port 443, valid target)_drskeyTXT record (valid base64 public key, 32 bytes)
drs test-resolve
Perform a full end-to-end resolution: DNS discovery, resolve, and signature verification.
drs test-resolve alice@mycompany.comdrs status
Show the current status of a DRS node.
drs status --domain mycompany.com \ --cf-token <token> --account-id <id> --kv-namespace <config-id>drs rotate-key
Generate a new Ed25519 keypair and update the DNS TXT record.
drs rotate-key --domain mycompany.com --cf-token <token>After rotation, update the Worker secret:
wrangler secret put DRS_SIGNING_KEY --env mycompanydrs sync
Sync local YAML address files to KV. Useful for managing addresses as code.
drs sync --dir ./addresses \ --cf-token <token> --account-id <id> --kv-namespace <addresses-id>Address file format (addresses/alice.yaml):
status: activeroutes: - value_type: USDC transfer_type: ethereum destination: "0xABC..." - value_type: ETH transfer_type: ethereum destination: "0xABC..."