Skip to content

Configuration

The CLI stores configuration at:

~/.hypedoc/config.json

Credentials are kept in your system keychain when one is available (see Authentication). The file holds your settings, and also your login on machines without a keychain.

FieldTypeDescription
tokenstringOnly without a keychain: your API or OAuth token
refresh_tokenstringOnly without a keychain: set by hype auth login
client_idstringOnly without a keychain: set by hype auth login
api_urlstringCustom API base URL (for self-hosting or development)
default_spacestringSpace used by hype log when you omit --space

Example:

{
"token": "hdoc_xxxxxxxxxxxxxxxxxxxx",
"api_url": "https://app.myhypedoc.com/api/v1"
}

The config file is created with 0600 permissions (readable only by you).

Environment variables override config file values:

VariableDescription
HYPEDOC_TOKENAPI token (overrides token in config)
HYPEDOC_API_URLAPI base URL (overrides api_url in config)
HYPEDOC_DEFAULT_SPACEDefault space for hype log (overrides default_space)
HYPEDOC_NO_KEYCHAINSet to 1 to keep credentials in the config file instead of the system keychain
NO_COLORSet to disable colored output

hype auth login uses the site behind HYPEDOC_API_URL, so it also works against a local or self-hosted server. Expired OAuth logins are renewed automatically with the saved refresh token.

Terminal window
export HYPEDOC_TOKEN=hdoc_xxxxxxxxxxxxxxxxxxxx
hype log "Deployed v2.1.0 to production" --space Work --tags deploy

If no api_url is configured, the CLI connects to:

https://app.myhypedoc.com/api/v1

The CLI provides clear error messages for common scenarios:

  • 401: Authentication failed, run hype auth login
  • 402: Free plan limit reached, with a link to upgrade
  • 429: Rate limited, with how long to wait when the server says

Errors are printed to stderr and the exit code is 1, so scripts can detect failures. Commands that return data (log, wins, spaces, tags) accept --json to print the API response instead of formatted text.