CLI Reference
pikeway keys activate
Choose which saved key the CLI uses by default.
Synopsis
bash
pikeway keys activate --label <label> [--json]
Description
Marks the key with this label as active in the local config file. Every later command that needs a key uses it, unless --key or PIKEWAY_API_KEY is given. The gateway is not contacted.
Options
--labelstringrequiredLabel of a saved key, as shown by
pikeway keys list.Examples
bash
# switch to the CI key pikeway keys activate --label ci # confirm which account it belongs to pikeway keys activate --label ci && pikeway whoami # one command with another key, without switching pikeway balance --key pk-...
Output
text
active key: ci
--json
json
{ "active": "ci" }Errors and exit codes
| Exit | Message | When |
|---|---|---|
| 2 | missing --label | --label was not given or has no value. |
| 2 | no key labelled "ci" | No saved key has this label. Check pikeway keys list. |
If
PIKEWAY_API_KEY is set, it still wins over the key you just activated. See API key resolution.