Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

auth

Manage API key authentication. An API key is optional — without one, requests are rate-limited.

zora auth [command]

Subcommands

SubcommandDescription
auth configureSave an API key
auth statusCheck current authentication status

Options

auth configure accepts --yes to skip the interactive prompt. Both subcommands accept the global --json flag.

FlagSubcommandDescription
--yesauth configureSkip the interactive prompt and execute directly
--jsonbothMachine-readable JSON output

Get an API Key

Get a key at zora.co/settings/developer. The key is stored at ~/.config/zora/config.json with restricted permissions.

Examples

Save an API key

npx @zoralabs/cli auth configure
 Get your API key from: https://zora.co/settings/developer
 
 Paste your API key: ********
 
 API key saved to ~/.config/zora/config.json

With --json, a successful save returns:

{ "saved": true, "path": "~/.config/zora/config.json" }

If ZORA_API_KEY is set in the environment, configure reports that the key is set via the environment variable and does not write to the config file:

{
  "status": "env_override",
  "message": "API key is set via ZORA_API_KEY environment variable."
}

Check authentication status

npx @zoralabs/cli auth status
 Authenticated
 
 Key     f7c3502c...3458
 Source  ~/.config/zora/config.json

JSON output

npx @zoralabs/cli auth status --json
{
  "authenticated": true,
  "key": "f7c3502c...3458",
  "source": "~/.config/zora/config.json"
}

When no key is configured:

{
  "authenticated": false
}

Environment Variable

The ZORA_API_KEY environment variable takes precedence over the config file. When the key comes from the environment, source is reported as env (ZORA_API_KEY):

export ZORA_API_KEY=your-key-here
npx @zoralabs/cli auth status --json
{
  "authenticated": true,
  "key": "your-key...here",
  "source": "env (ZORA_API_KEY)"
}