Captured 2026-10-30 08:49-08:50 (UTC+8). Repo: https://github.com/google-gemini/gemini-api-cli main b8b608261bc2 (2026-10-29 14:32 -0700 = 2026-10-30 05:32 UTC+8), Apache-2.0, 373 stars (GitHub API). Latest release: v0.4.4, published 2026-10-23T16:51Z (2026-10-24 00:51 UTC+8); v0.4.3 2026-10-19; v0.4.2 2026-10-12. Assets: Darwin/Linux/Windows x arm64/x86_64 + checksums.txt. README claims (verbatim): - **One binary for models, media, and managed agents:** Access text and reasoning models, multimodal file analysis, image/audio/music/video generation, and managed agents from the command line. - **Delegate long-running work:** Start a Gemini managed agent in the background, keep the returned interaction ID, and retrieve the result when needed. - **Self-describing interface:** Commands, flags, request schemas (`--schema`), and machine-readable usage (`--usage`) are built into the binary so an agent can inspect what it needs on the fly. - **Safe dry-run validation:** `--dry-run` validates inputs and prints the resolved HTTP request with credentials redacted—without making a network call or reading the OS keychain. - **Script- and agent-friendly output:** Stream text, write media directly to disk, emit structured JSON (`--output-format json`) or compact TOON (`--output-format toon`), or filter fields inline with `--jq`. - **Stateless execution:** Each invocation runs independently. Your agent supplies the context, chooses the model, and controls the next step. Built for headless use by coding agents and assistant tools, with the same interface available to shell scripts and CI jobs. A single Go binary runs on macOS, Linux, and Windows. - **`--usage`** outputs the complete command tree, flags, defaults, environment variables, and config keys as machine-readable [KDL](https://kdl.dev). - **`--schema`** prints the bundled JSON Schema (draft 2020-12) for any command that accepts a request body. - **`--dry-run`** validates flags and payloads and previews the HTTP request without credentials or network access (use `--dry-run --output-format json` for machine-parseable JSON request previews). - **`--no-interactive`** disables all interactive prompts and TUI forms. - **`--agent-mode`** (or `GEMINI_CLI_AGENT_MODE=1`) enables structured JSON error envelopes on `stderr` and defaults `stdout` to compact [TOON](https://github.com/toon-format/spec) output (`--output-format json` explicitly selects JSON). - **Exit codes** distinguish success (`0`), runtime/API failures (`1`), invalid usage/validation errors (`2`), and authentication/authorization failures (`3`). Status note (verbatim): > `gemini-api` is in **beta** and evolving alongside the [Gemini Interactions API](https://ai.google.dev/gemini-api/docs/interactions-overview). Breaking changes may occur between releases; we recommend pinning to a specific [release version](https://github.com/google-gemini/gemini-api-cli/releases) in CI and automated workflows. Pricing (https://ai.google.dev/gemini-api/docs/pricing, checked 2026-10-30): - CLI itself: free, Apache-2.0. - Gemini API: 'Start building free of charge with generous limits, then scale up with prepaid and pay-as-you-go pricing'. Gemini 3.8 Flash (CLI default for generate/analyze): Free tier input/output 'Free of charge'; paid tier $0.75 input / $3.75 output per 1M tokens through 2026-12-31, $1.50 / $7.50 from 2027-01-01. 'Gemini 4 Argon is not available on the Free tier.' - Key: created in Google AI Studio (https://ai.google.dev/gemini-api/docs/api-key), i.e. needs a Google account.