Configuration
Config file
Section titled “Config file”The CLI stores configuration at:
~/.hypedoc/config.jsonCredentials 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.
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
token | string | Only without a keychain: your API or OAuth token |
refresh_token | string | Only without a keychain: set by hype auth login |
client_id | string | Only without a keychain: set by hype auth login |
api_url | string | Custom API base URL (for self-hosting or development) |
default_space | string | Space 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
Section titled “Environment variables”Environment variables override config file values:
| Variable | Description |
|---|---|
HYPEDOC_TOKEN | API token (overrides token in config) |
HYPEDOC_API_URL | API base URL (overrides api_url in config) |
HYPEDOC_DEFAULT_SPACE | Default space for hype log (overrides default_space) |
HYPEDOC_NO_KEYCHAIN | Set to 1 to keep credentials in the config file instead of the system keychain |
NO_COLOR | Set 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.
CI/CD example
Section titled “CI/CD example”export HYPEDOC_TOKEN=hdoc_xxxxxxxxxxxxxxxxxxxxhype log "Deployed v2.1.0 to production" --space Work --tags deployDefault API URL
Section titled “Default API URL”If no api_url is configured, the CLI connects to:
https://app.myhypedoc.com/api/v1Error handling
Section titled “Error handling”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.