monid keys
Manage API keys stored locally on your machine.
Commands
monid keys add-- Add an API keymonid keys list-- List stored API keysmonid keys activate-- Switch the active API keymonid keys remove-- Remove an API key
keys add
Add an API key to your local credential store.
Usage
bash
monid keys add --label <name> --key <key> [--json]Flags
| Flag | Type | Required | Description |
|---|---|---|---|
-l, --label <label> | string | Yes | A unique label for the key |
-k, --key <key> | string | Yes | The API key |
-j, --json | boolean | No | Output raw JSON |
Examples
bash
# Add a production key
monid keys add --label production --key monid_live_a1b2c3d4e5f6...
# Add a test key
monid keys add --label staging --key monid_test_x9y8z7w6v5u4...Behavior
- Label must be unique across stored keys
- The first key you add is automatically set as the active key
keys list
List all stored API keys.
Usage
bash
monid keys list [--json]Output
Label Key Added Active
production monid_live_a1b2**** 2026-01-15 10:00 *
staging monid_test_x9y8**** 2026-01-20 14:30The active key (marked with *) is used for all API calls.
keys activate
Switch the active API key.
Usage
bash
monid keys activate --label <name>Flags
| Flag | Type | Required | Description |
|---|---|---|---|
-l, --label <label> | string | Yes | Label of the key to activate |
Examples
bash
monid keys activate --label stagingkeys remove
Remove an API key from your local credential store.
Usage
bash
monid keys remove --label <name> [--force] [--json]Flags
| Flag | Type | Required | Description |
|---|---|---|---|
-l, --label <label> | string | Yes | Label of the key to remove |
--force | boolean | No | Skip confirmation prompt |
-j, --json | boolean | No | Output raw JSON |
Behavior
- If the removed key was the active key, it's deactivated
- This only removes the key locally -- it does not revoke the key on the server
TIP
To revoke a key on the server (so it can no longer be used for API calls), use the Monid web app.
Next Steps
- CLI Overview -- Back to CLI overview