Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

refactor: cross-platform keyring and improved auth UX#35

Merged
jmgilman merged 1 commit intomasterfrom
refactor/cross-platform-auth
Jan 3, 2026
Merged

refactor: cross-platform keyring and improved auth UX#35
jmgilman merged 1 commit intomasterfrom
refactor/cross-platform-auth

Conversation

@jmgilman
Copy link
Copy Markdown
Collaborator

@jmgilman jmgilman commented Jan 3, 2026

Summary

  • Cross-platform keyring: Replace macOS-only keychain with 99designs/keyring library supporting macOS Keychain, Windows Credential Manager, Secret Service (GNOME/KDE), Linux kernel keyring, and encrypted file fallback
  • Dual auth modes: Add subscription (OAuth) and API key authentication for all agents (Claude, Gemini, Codex)
  • Improved UX: Use charmbracelet/huh for interactive selection picker and masked password input
  • Status flag: Add --status flag to check configured auth per provider (hjk auth claude --status)

Test plan

  • Run just check to verify all tests pass
  • Test hjk auth claude - verify interactive picker works with arrow keys
  • Test hjk auth claude --status - verify status output
  • Test masked input shows dots when entering tokens/keys

🤖 Generated with Claude Code

- Replace macOS-only keychain with cross-platform keyring (99designs/keyring)
  - Supports macOS Keychain, Windows Credential Manager, Secret Service,
    Linux kernel keyring (keyctl), and encrypted file fallback
  - Add HEADJACK_KEYRING_BACKEND and HEADJACK_KEYRING_PASSWORD env vars

- Add dual authentication modes for all agents
  - Subscription: OAuth tokens from CLI tools (existing subscriptions)
  - API Key: Direct API keys for pay-per-use billing
  - Credentials stored as JSON with type field

- Improve auth command UX with charmbracelet/huh
  - Interactive selection picker (arrow keys) instead of numbered menu
  - Masked password input (shows dots) for tokens/keys
  - Add --status flag to check configured auth per provider

- Update documentation for new auth system

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
headjack e0f22b5 Commit Preview URL

Branch Preview URL
Jan 03 2026, 04:07 AM

@jmgilman jmgilman merged commit 7dacd68 into master Jan 3, 2026
2 checks passed
@jmgilman jmgilman deleted the refactor/cross-platform-auth branch January 3, 2026 04:21
jmgilman added a commit that referenced this pull request Jan 3, 2026
Current behavior:
Authentication only supported macOS-only keychain storage with single auth mode per provider requiring numbered menu selection and visible token input

New behavior:
Cross-platform keyring supports macOS Keychain, Windows Credential Manager, Secret Service, Linux kernel keyring, and encrypted file fallback with dual authentication modes (subscription OAuth and API key) and improved interactive UX with arrow key selection and masked password input

Closes: #35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant