Skip to content

Add API key management commands#83

Merged
piekstra merged 1 commit intomainfrom
piekstra/82-add-api-key-management
Feb 11, 2026
Merged

Add API key management commands#83
piekstra merged 1 commit intomainfrom
piekstra/82-add-api-key-management

Conversation

@piekstra
Copy link
Collaborator

@piekstra piekstra commented Feb 11, 2026

Why

During annual key rotations, managing API keys requires hand-crafting NerdGraph GraphQL mutations which is error-prone and hard to remember. First-class CLI commands make key operations ergonomic and scriptable.

Summary

  • Add nrq keys list — search keys with optional --type and --account filters
  • Add nrq keys get <id> — inspect a specific key (auto-detects type if --type omitted)
  • Add nrq keys create --type user|ingest --name <name> — create user or ingest keys
  • Add nrq keys update <id> — update key name/notes (auto-detects type if --type omitted)
  • Add nrq keys delete <id>... — delete one or more keys with confirmation prompt
  • API layer in api/keys.go wrapping NerdGraph apiAccess queries and mutations
  • 25 unit tests with mock server fixtures

Test plan

  • make verify passes (fmt, lint, tests)
  • Smoke test: nrq keys create --type user --name "test-key", then list, get, update --name, delete

Closes #82

Add `nrq keys` commands (list, get, create, update, delete) as
ergonomic wrappers around the NerdGraph apiAccess API.

Closes #82
@piekstra piekstra merged commit 17a090e into main Feb 11, 2026
2 checks passed
@piekstra piekstra deleted the piekstra/82-add-api-key-management branch February 11, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API key management commands

1 participant

Comments