Google ships a stateless CLI for scripting the Gemini API
The open-source gemini-api tool gives agents and CI pipelines shell access to Gemini generation, analysis and managed agents, without an SDK.
Google released an experimental CLI for the Gemini API on 27 October, called gemini-api. It’s a separate tool from the existing Gemini CLI coding agent: this one is built for scripts, CI pipelines and other agents that want to call Gemini from the shell rather than pull in an SDK.
Commands are grouped by job: generate, image, tts, music and video for creation, analyze and transcribe for understanding files, and agent for running Gemini’s managed agents. The design is deliberately stateless, commands keep no hidden local state, so multi-step work has to be chained explicitly with flags like --previous-interaction-id rather than relying on a saved session. It installs as a single zero-dependency binary on macOS, Linux and Windows, with prebuilt releases available for pinning in CI.
curl -fsSL https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.sh | bash
gemini-api generate -m gemini-4-argon "summarise this file" --output-format json
Why it matters: a stateless, dependency-free binary is a much smaller thing to drop into a CI job or hand to another agent than a language-specific SDK. The --dry-run and --output-format json flags suggest it’s aimed squarely at scripting rather than interactive use.
The caveat: it’s an early beta on GitHub, not a stable release, so expect the command surface to shift before it settles.