
npx @google/gemini-clinpx.ps1 because of ExecutionPolicy → error) · macOS/Linux: open Terminal.▶️ Usage summary
- Install:
npx @google/gemini-cli - Start in current directory:
gemini - Include multiple directories:
gemini --include-directories ../lib,../docs - Use specific model:
gemini -m gemini-2.5-flash - Get a simple text response:
gemini -p "Explain the architecture of this codebase" - the --output-format json flag to get structured output:
gemini -p "Explain the architecture of this codebase" --output-format json - use --output-format stream-json to get newline-delimited JSON events:
gemini -p "Run tests and deploy" --output-format stream-json
Gemini CLI — The Gemini AI assistant right in your command line: ask questions, read and edit code.
What is Gemini CLI?
Gemini CLI is an open-source app on GitHub (google-gemini/gemini-cli). The Gemini AI assistant right in your command line: ask questions, read and edit code.
What can Gemini CLI do?
- Chat with Gemini right in the Terminal
- Read and edit code in your project
- Automate tasks with commands
How to install Gemini CLI
See the ⚡ Quick install section at the top of the page — it has a ready-to-copy command taken from the author’s README, plus where to run it. For the full instructions, see the README at the end of the page.
Frequently asked questions about Gemini CLI
Is Gemini CLI free?
Yes. Gemini CLI is an open-source project on GitHub, so you can download and use it for free.
Is Gemini CLI hard to install?
No. You only need to run one command above.
Download & source code
The source code, README and latest updates of Gemini CLI are at github.com/google-gemini/gemini-cli. The star count and update date on this page sync automatically from GitHub.
📖 Full guide
Loading the guide…