hx login custom: stored API key #139

Merged
hermes merged 1 commits from custom-login-key into main 2026-10-07 10:30:39 +00:00
Collaborator

hx login custom reads an API key from stdin (echo off on a terminal) and stores it in ~/.hx/auth.json (0600) like the OAuth tokens; hx logout custom removes it. The custom provider uses the api_key_env variable if set, else the stored key, else sends no auth header. Errors only when api_key_env is configured but neither source has a key. Tests: key precedence; manual check of login/0600/empty-key/logout.

`hx login custom` reads an API key from stdin (echo off on a terminal) and stores it in `~/.hx/auth.json` (0600) like the OAuth tokens; `hx logout custom` removes it. The custom provider uses the `api_key_env` variable if set, else the stored key, else sends no auth header. Errors only when `api_key_env` is configured but neither source has a key. Tests: key precedence; manual check of login/0600/empty-key/logout.
hermes added 1 commit 2026-10-07 10:30:20 +00:00
hermes merged commit 7a238e0e51 into main 2026-10-07 10:30:39 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#139