Repository navigation
v0.3.0
gemini-api has been rewritten in Go. This release replaces the TypeScript CLI shipped in v0.1.0–v0.2.1 and is not backward compatible: commands, flags and output formats have changed.
Install
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.sh | bash
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.ps1 | iex
Go:
go install github.com/google-gemini/gemini-api-cli/cmd/gemini-api@latest
Or download an archive below (Linux, macOS, Windows · x86_64, arm64) and verify it against checksums.txt.
What's new
Dedicated commands per task. Capabilities that were flags on run are now their own commands:
generate: text and multimodal generationimage: image generation and editingtts: text to speech, including multi-speakeranalyze: questions about images, audio, video, documents or YouTube URLs- New:
music,video,transcribe,tokens
Interaction lifecycle.
agent run --backgroundreturns an interaction ID immediately.agent status,agent cancelandagent delete-interactionmanage it afterwards.
New API coverage.
files: Files API upload, list, get, delete, and registering Cloud Storage objectsmodels: curated catalog plus live list/getenvironments,triggers,webhooks,credentialsdocs: Gemini API docume
Setup and auth.configure,authandwhoamistore credentials in~/.config/gemini-api/config.yamlor the OS keyring.GEMINI_API_KEYstill works.- OAuth via
--access-token/GEMINI_ACCESS_TOKEN, and quota projects via--user-project.
Scripting and agents.
-o pretty|json|yaml|table|toon,--jq,--dry-run--body/--schemafor full request control, and--usagefor a machine-readable CLI schema--agent-modefor structured errors- Documented exit codes: 0 ok · 1 runtime · 2 usage · 3 auth
Interactive. explore browses and runs commands, and completion supports bash, zsh, fish and PowerShell.
Changelog
- 23c8d31 fix(cli): set
project_name: gemini-apiin.goreleaser.yaml - 552828c Merge pull request #38 from google-gemini/import-test-new
- 77848e2 Update the test
- 2eae3b1 First import of the test/* and evals/*
- 895be4d fix(cli): remove unconfigured voices service from CLI surface
- e855807 feat(cli): bind
-i, --idontriggers runandtriggers list-executions - 148e3b7 chore: Add licensing and disclaimer section to README files.
- c31a119 chore(cli): add model suggestions for image, video, and music commands in CLI overlay
- 7a2e8ce chore(cli): regenerate CLI with Speakeasy v2.941.1
- 20aaa63 chore(cli): override environments and environments files list help text in CLI overlay
- f5168fd Merge pull request #23 from google-gemini/copybara/987626002
- 896a7b5 fix(cli): align stale path keys in CLI overlays with GAOS OpenAPI spec
- d9b392e chore(cli): improve webhook examples in CLI overlay
- af53a80 chore: Add licensing and disclaimer section to README files.
- d3c649a No public description
- cb63496 Merge pull request #14 from google-gemini/feat/add-yaml-secrets-var
- ed136c6 feat(config): resolve env placeholders in agent yaml
- b2c15ec test(config): add env placeholder fixture