This repository was archived by the owner on Apr 15, 2026. It is now read-only.
feat(auth): implement hjk auth gemini command#26
Merged
Conversation
Add support for Gemini CLI authentication in Headjack containers. The implementation: - Reads OAuth credentials and account info from ~/.gemini/ - Stores config securely in macOS Keychain - Injects credentials into containers via environment variable - Writes required config files (oauth_creds.json, google_accounts.json, settings.json) during session setup Closes JMG-18 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
Author
|
@codex Please review |
|
To use Codex here, create a Codex account and connect to github. |
Collaborator
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
Collaborator
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
Collaborator
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
jmgilman
added a commit
that referenced
this pull request
Jan 3, 2026
Current behavior: N/A - new feature New behavior: Adds hjk auth gemini command that reads OAuth credentials and account info from ~/.gemini/, stores config securely in macOS Keychain, and injects credentials into containers via environment variables during session setup Closes: #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hjk auth geminicommand to configure Gemini CLI authentication for use in Headjack containersChanges
internal/auth/gemini.go: NewGeminiProviderthat readsoauth_creds.jsonandgoogle_accounts.jsonfrom~/.gemini/internal/auth/gemini_test.go: Unit tests for config reading and validationinternal/cmd/auth.go: Addhjk auth geminisubcommandinternal/cmd/run.go: Inject Gemini credentials viaGEMINI_OAUTH_CREDSenv varinternal/instance/manager.go: Write Gemini config files during session setup (oauth_creds.json, google_accounts.json, settings.json)Test plan
hjk auth geminito store credentials from hosthjk run <branch> --agent geminito create container sessionjust check)Closes JMG-18
🤖 Generated with Claude Code