For the complete documentation index, see llms.txt. This page is also available as Markdown.

Doma CLI

The Doma CLI (@doma-protocol/cli, distributed as the doma binary) is the local TypeScript tool that executes everything skills decide on: token swaps, marketplace orders, DNS edits, bridges, subdomain operations, and authentication. It is designed to be both human-driven (interactive prompts, pretty output) and AI-driven (--quiet --format json for clean machine-readable I/O).

Install

npm install -g @doma-protocol/cli
doma --version

Requires Node.js ≥ 20.

Configure

Configuration is stored in ~/.doma/config.json. Set values either via the CLI:

doma config set <key> <value>

Or by editing ~/.doma/config.json directly:

{
  "privateKey": "<keychain-on-macos>",
  "apiKey": "<your-doma-api-key>",
  "chainId": 97477,
  "testnet": false,
  "walletMode": "private-key"
}

Config keys

Key
Description
Default

privateKey

Wallet private key (required for transactions in private-key mode)

(none)

apiKey

API key for the Doma GraphQL endpoint

(none)

apiUrl

Override the API endpoint (--testnet flag overrides this)

(none)

routingApiUrl

Override the routing API endpoint

(none)

chainId

Default chain ID for writes

97477 (Doma mainnet)

testnet

Use Doma testnet instead of mainnet

false

walletMode

agent (Privy delegated) or private-key (local)

private-key

Environment variable overrides

Env vars take precedence over ~/.doma/config.json:

Config key
Env var

privateKey

DOMA_PRIVATE_KEY

apiKey

DOMA_API_KEY

apiUrl

DOMA_API_URL

routingApiUrl

DOMA_ROUTING_API_URL

chainId

DOMA_CHAIN_ID

testnet

DOMA_TESTNET

walletMode is config-only (no env-var override), change it via doma config set walletMode <agent|private-key>.

macOS Keychain

On macOS, doma config set privateKey stores the key in the system Keychain rather than config.json. To force plain-text storage instead:

On Linux and Windows, config.json is used unconditionally.

Network selection

Use --testnet on any command to target Doma Testnet:

Or persist the choice:

Supported chains

Chain
Chain ID

Doma Mainnet

97477

Doma Testnet

97476

Ethereum

1

Base

8453

DNS and nameserver writes on the Doma chain use sponsored gas via ERC-4337 + EIP-7702. You don't need ETH on Doma chain to set DNS records or rotate nameservers. Other operations (swaps, bridges, marketplace transactions) require gas in the chain's native token.

What's next

  • Wallet Modes: choose between agent (Privy) and private-key signing.

  • Commands: full per-command reference with examples.

Last updated