Skip to content
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
jmgilman merged 1 commit intomasterfrom
joshuagilman/jmg-18-implement-hjk-auth-gemini-command
Jan 2, 2026
Merged

feat(auth): implement hjk auth gemini command#26
jmgilman merged 1 commit intomasterfrom
joshuagilman/jmg-18-implement-hjk-auth-gemini-command

Conversation

@jmgilman
Copy link
Copy Markdown
Collaborator

@jmgilman jmgilman commented Jan 2, 2026

Summary

  • Implement hjk auth gemini command to configure Gemini CLI authentication for use in Headjack containers
  • Add credential injection into containers during Gemini session setup
  • Store OAuth credentials and account info securely in macOS Keychain

Changes

  • internal/auth/gemini.go: New GeminiProvider that reads oauth_creds.json and google_accounts.json from ~/.gemini/
  • internal/auth/gemini_test.go: Unit tests for config reading and validation
  • internal/cmd/auth.go: Add hjk auth gemini subcommand
  • internal/cmd/run.go: Inject Gemini credentials via GEMINI_OAUTH_CREDS env var
  • internal/instance/manager.go: Write Gemini config files during session setup (oauth_creds.json, google_accounts.json, settings.json)

Test plan

  • Run hjk auth gemini to store credentials from host
  • Run hjk run <branch> --agent gemini to create container session
  • Verify Gemini CLI starts without prompting for authentication
  • All checks pass (just check)

Closes JMG-18

🤖 Generated with Claude Code

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>
@linear
Copy link
Copy Markdown

linear Bot commented Jan 2, 2026

@jmgilman
Copy link
Copy Markdown
Collaborator Author

jmgilman commented Jan 2, 2026

@codex Please review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@jmgilman
Copy link
Copy Markdown
Collaborator Author

jmgilman commented Jan 2, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@jmgilman
Copy link
Copy Markdown
Collaborator Author

jmgilman commented Jan 2, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@jmgilman
Copy link
Copy Markdown
Collaborator Author

jmgilman commented Jan 2, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@jmgilman jmgilman merged commit d67f802 into master Jan 2, 2026
1 check passed
@jmgilman jmgilman deleted the joshuagilman/jmg-18-implement-hjk-auth-gemini-command branch January 2, 2026 02:33
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
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