Documentation

Keys and configuration

Configure one active credential securely and understand which API origin the CLI will use.

View as Markdown
On this page

Add your API key

Replace YOUR_API_KEY and run one of these commands locally. The CLI performs a read-only access check before saving the key. A failed check preserves the previous configuration. Avoid the argument form when terminal history must not contain the key; use hidden input below.

Shell
purrkey keys add YOUR_API_KEY
# Equivalent flag form
purrkey keys add -k YOUR_API_KEY

Use hidden input or a secret store

purrkey config prompts for hidden input in an interactive terminal. --key-stdin reads the key from stdin. ATX_API_KEY provides a runtime credential override without putting the key in a request file. Saving a new key does not clear this environment override; update or remove it when rotating credentials.

Shell
purrkey config
# For scripts: pipe a secret from your secret manager
# <secret-manager command> | purrkey config --key-stdin

Environment variables

The ATX_ names are supported compatibility names. Normal installation uses the built-in production API and does not require these variables. By default, configuration and recovery files live in the operating system's user configuration directory under agenttoolx.

VariablePurpose
ATX_API_KEYOverrides the saved key for API requests.
ATX_API_URLOverrides the saved API origin unless --api-url is provided.
ATX_CLI_HOMEOverrides the configuration and recovery-journal directory.

Change the API origin only when needed

Origin precedence is --api-url, then ATX_API_URL, then saved configuration, then the built-in production address. HTTPS is required except for loopback development addresses.

Starting with 0.3.4, the CLI uses api.purrkey.app for configurations saved with the former production address. Your key and Run recovery records carry over. If you set ATX_API_URL to the old address, remove that override. To switch a custom deployment to production, run the command below.

Shell
purrkey config --api-url https://api.purrkey.app