gemini-api-cli: A stateless command-line interface for connecting coding agents with Gemini models, media capabilities, and managed agents.
What problem it solves
Coding agents and assistants often need model, media-analysis, and delegation capabilities that are not available through their existing shell interface. This CLI provides a shared, discoverable interface for generating and editing assets, analyzing files, transcribing media, and running managed agents from scripts, CI jobs, or agent workflows.
Key features
Models, media, and managed agents — One binary provides text and multimodal generation, file analysis, image, audio, music, and video generation, and access to managed agents.
Source: README
Self-describing command interface — Agents can inspect the command tree, flags, defaults, environment variables, configuration keys, and request schemas directly from the binary.
Source: README
Offline request validation — A dry-run mode validates flags and payloads and previews the resolved HTTP request without reading credentials or making a network call.
Source: README
Script- and agent-friendly output — Results can be streamed, written directly to disk, returned as JSON or TOON, or filtered inline, making the interface suitable for automation and agent workflows.
Source: README
Background agent delegation — Long-running managed-agent work can start in the background, return an interaction ID immediately, and later be monitored, retrieved, streamed, or canceled.
Source: README
Quick start
Copied verbatim from the project's README.
go install github.com/google-gemini/gemini-api-cli/cmd/gemini-api@latestexport GEMINI_API_KEY="YOUR_API_KEY"gemini-api image "A friendly robot mascot for a developer tool" --out ./assets/Who it may suit
Inference: may suit coding agents, assistant tools, shell-script authors, and CI workflows that need a discoverable interface to Gemini models, media operations, and managed-agent tasks.
Topics to discuss
Which command outputs and file-handling conventions are most useful in agent workflows?
How should machine-readable errors and interruption handling evolve for long-running tasks?
Which managed-agent and media workflows should receive more examples or evaluation coverage?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/google-gemini/gemini-api-cli#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…