Configuration
The Zora CLI stores configuration in ~/.config/zora/ with two files:
| File | Contents | Permissions |
|---|---|---|
config.json | API key, analytics ID | 0600 |
wallet.json | Encrypted private key | 0600 |
On Windows, the config directory is %APPDATA%\zora\ or ~\AppData\Roaming\zora\.
API Key
An API key is optional. Without one, read-only commands work but may be rate-limited.
Configure via CLI
npx @zoralabs/cli auth configure
# Prompts for your API key and saves to config.jsonConfigure via Environment Variable
export ZORA_API_KEY=your-key-hereThe environment variable takes precedence over the config file.
Get an API Key
Generate one at zora.co/settings/developer.
Wallet
Trading commands (buy, sell, send, balance) require a wallet.
Create via CLI
npx @zoralabs/cli setup --createImport via CLI
npx @zoralabs/cli setup
# Interactive prompt to paste a private keyConfigure via Environment Variable
export ZORA_PRIVATE_KEY=0x...The environment variable takes precedence over the wallet file. This is recommended for CI/CD, containers, and agent runtimes.
All Environment Variables
| Variable | Description |
|---|---|
ZORA_API_KEY | API key (overrides config file) |
ZORA_PRIVATE_KEY | Wallet private key (overrides wallet file) |
ZORA_API_TARGET | Override API base URL (for dev/staging) |
ZORA_NO_ANALYTICS | Set to 1 to disable analytics |
DO_NOT_TRACK | Set to 1 to disable analytics |
Analytics
The CLI collects anonymous usage analytics via PostHog. No personal data is collected — only command names, success/failure status, and CLI version.
Opt out by setting either:
export ZORA_NO_ANALYTICS=1
# or
export DO_NOT_TRACK=1Agent Configuration
For AI agents and automated environments, configure everything via environment variables to avoid interactive prompts:
export ZORA_PRIVATE_KEY=0x...
export ZORA_API_KEY=your-key-here
export ZORA_NO_ANALYTICS=1Then use --json and --yes flags on all commands:
npx @zoralabs/cli balance --json
npx @zoralabs/cli buy 0x... --eth 0.01 --yes --json