Repository navigation
feat: add Gemini CLI provider - #100
Merged
Merged
Conversation
Drive Google's `gemini` binary in headless non-TTY mode with documented flags (--output-format stream-json, --approval-mode yolo, --skip-trust, --model, --resume, --include-directories). Prompt stays on stdin so --prompt/-p is never treated as Claude's boolean print mode. Detect/doctor probe the binary, version, GEMINI_API_KEY set/unset, and oauth files without printing secrets. /model seeds full ids from the CLI reference and omits aliases. Tests use fixtures only. Co-authored-by: rimusz <rimusz@users.noreply.github.com>
README on main (and this PR) had junk `shadow-edit` lines after the license section. End the file after the license paragraph, and mention Gemini CLI install plus Google / GEMINI_API_KEY auth in the provider section with a pointer to INSTALL.md. Co-authored-by: rimusz <rimusz@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add native Google Gemini as a first-class atr provider (
kind = "gemini"), next to grok, cursor, claude, codex, and opencode. Todaygeminionly appeared as cursor/opencode model IDs.Headless Gemini CLI
atr drives the official
geminibinary. Headless mode is a non-TTY stdin pipe (atr always pipes stdin) or--prompt/-p.--prompttakes a string, so it is not placed inargsas Claude/Cursor's boolean-p(that would make--output-formatthe prompt). Workers auto-approve with--approval-mode yolo(not deprecated--yolo/-y).Flags used (from the official docs, not invented):
--output-format stream-jsonjsonalso parsed)--approval-mode yolo--skip-trust--model/-m--resume/-r--include-directories--dirconfinementDocs:
Detect / doctor / TUI
--version; auth fromGEMINI_API_KEY(set/unset only, never the value) or~/.gemini/oauth_creds.json/google_accounts.json. Nogemini auth status(not in the CLI reference); never starts the interactive REPL./modelseeds documented full ids (gemini-3-pro-preview,gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite) and omits aliases (auto,pro,flash,flash-lite). Nogemini modelscatalog command.stats.models[].tokens.{prompt,candidates,cached}(prompt includes cache → store uncached input like Codex). Errors map to existingAuth/Limitclasses.~/.gemini/skills/atr), example.toml (commented), operator + atr-dev skills, docs.Tests
Fixtures only (
tests/fixtures/models/gemini_models.txt,tests/fixtures/usage/gemini.json, fake-agent JSONL). No live Gemini API calls in CI.Local:
cargo fmt --all -- --check,cargo clippy --all-targets -- -D warnings,cargo test --all -- --test-threads=4,cargo deny check,sh tests/skills-sync.shall green.Process notes
origin/mainat15835cb(PR fix: protect_tests uses repo base; show parked tasks as idle #99).Not live-tested
geminilogin (Google OAuth orGEMINI_API_KEY) on a host.stream-jsonagainst Google's API (CI uses the fake CLI).