prokodo auth
Manage your prokodo API key credentials.
prokodo auth <sub-command> [options]
Sub-commands
auth login
Store an API key in the credentials file at ~/.config/prokodo/credentials.json.
prokodo auth login --key <key>
Options
| Flag | Type | Description |
|---|---|---|
--key <key> | string | API key to store. Omit to enter interactively (TTY only). |
Behaviour
- Validates the key shape (β₯ 8 characters, no
<or>placeholders) - Performs a non-destructive health check against the API to confirm the key is accepted
- Writes
~/.config/prokodo/credentials.jsonwith0600permissions - Prints the masked key hint on success
Examples
prokodo auth login --key pk_live_abc123xyz789
# JSON mode β useful for scripted provisioning
prokodo auth login --key pk_live_abc123xyz789 --json
# β { "authenticated": true, "keyHint": "β’β’β’β’β’β’β’β’xyz789" }
Exit codes
| Code | Cause |
|---|---|
0 | Key stored successfully |
2 | No key provided in non-interactive mode |
2 | Key fails shape validation |
1 | API rejected the key |
note
When stdin is not a TTY (CI, Docker, pipe), the --key flag is required. The CLI will exit 2 with an explanatory message if it is omitted.
auth logout
Remove the stored credentials file.
prokodo auth logout
Behaviour
- Deletes
~/.config/prokodo/credentials.jsonif it exists - Exits
0whether credentials existed or not (idempotent) - Reports whether credentials were actually removed
Examples
prokodo auth logout
# Text: β Credentials removed. OR βΉ No credentials were stored.
prokodo auth logout --json
# β { "loggedOut": true } OR { "loggedOut": false }
auth whoami
Show the currently active API key (masked β last 4 characters visible) and its source.
prokodo auth whoami
Priority chain (highest to lowest):
--api-keyCLI flagPROKODO_API_KEYenvironment variable~/.config/prokodo/credentials.json
If none are found, exits 2 with instructions.
Examples
prokodo auth whoami
# API key: β’β’β’β’β’β’β’β’xyz789
# Source: credentials file
PROKODO_API_KEY=pk_live_test prokodo auth whoami --json
# β { "keyHint": "β’β’β’β’test" }
Credentials file location
| Platform | Path |
|---|---|
| macOS / Linux | ~/.config/prokodo/credentials.json |
| Windows | %APPDATA%\prokodo\credentials.json |
The file is created with 0600 permissions on POSIX systems. A warning is printed on startup if permissions are more permissive.