google-gemini/gemini-api-cli

gemini-api is a single-file command-line tool written in Go. Once the Gemini API Key is configured, agents with shell access such as Codex, Claude Code, and Antigravity can use it to generate text, images, speech, music, and video; analyze PDFs, images, audio/video files, and YouTube links; transcribe recordings into subtitles; and launch Gemini-hosted agents in the background, retrieving results by the returned ID. Media commands only print the path of the written file, making it easy for agents to continue processing; --agent-mode outputs structured errors and a concise format.

gemini-api is a single-file command-line tool written in Go. Once the Gemini API Key is configured, agents with shell access such as Codex, Claude Code, and Antigravity can use it to generate text, images, speech, music, and video; analyze PDFs, images, audio/video files, and YouTube links; transcribe recordings into subtitles; and launch Gemini-hosted agents in the background, retrieving results by the returned ID. Media commands only print the path of the written file, making it easy for agents to continue processing; --agent-mode outputs structured errors and a concise format.

Why it matters A single executable plus standard shell commands allows agents to discover usage via --help and --schema, preview requests without network access using --dry-run, and requires almost no changes to agent configuration.

Stars 1076 (+48 / 24h)

Reasons

  • 48 new stars in the last 24 hours, total stars 1076, ranked 13 on Trendshift for the day (indicating attention only); published by the google-gemini organization, README marked Apache 2.0
  • The command tree, parameters, and request structures can be queried directly from the program itself, without relying on external documentation

Usage

  • On macOS / Linux, run the install.sh script from the README to install (or go install github.com/google-gemini/gemini-api-cli/cmd/gemini-api@latest), export GEMINI_API_KEY, then first run gemini-api generate "Hello from my agent" --dry-run, and paste the four-line instructions from the README into AGENTS.md or CLAUDE.md

Risks

  • The repository description states it is an experimental tool and does not accept external PRs; all calls are billed according to the Gemini API, so usage must be monitored when agents invoke it autonomously
  • GitHub does not recognize the license, so refer to the LICENSE file in the repository; files uploaded via the Files API are retained for 48 hours

Open

Trendshift(GitHub Trending 快照)

Explore the latest AI Radar updates