CLI Reference
pikeway keys list
Show the keys saved on this machine, masked, with the active one marked.
Synopsis
bash
pikeway keys list [--json] pikeway keys # same as keys list
Description
Reads the local config file (~/.config/pikeway/config.json, see Config file) and lists every saved label. Keys are masked to their first 6 and last 4 characters; keys of 12 characters or fewer show as ****. The full key is never printed.
This command doesn't contact the gateway and doesn't check whether the keys still work; use pikeway whoami or pikeway setup for that. keys without a subcommand runs list.
Options
None besides --json.
Examples
bash
pikeway keys list # which label is active? pikeway keys list --json | jq -r .active # use a different config directory (e.g. per project) XDG_CONFIG_HOME=$PWD/.config pikeway keys list
Output
text
● main pk-AbC…xYz9 ci pk-9fQ…T2mw
●marks the active key, the one used when neither--keynorPIKEWAY_API_KEYis set.- No keys saved:
No keys. Add one: pikeway keys add --label main --key pk-...
--json
json
{
"active": "main",
"keys": [
{ "label": "main", "key": "pk-AbC…xYz9" },
{ "label": "ci", "key": "pk-9fQ…T2mw" }
]
}active is null and keys is empty when nothing is saved.
Errors and exit codes
Listing never fails: a missing or unreadable config file is treated as empty.
| Exit | Message | When |
|---|---|---|
| 2 | unknown: pikeway keys foo (use list | add | activate | remove) | Unknown subcommand. |
The active key shown here is ignored while
PIKEWAY_API_KEY is set. See API key resolution.