Gemini CLI ai
Google's AI assistant in your terminal
Gemini CLI brings Google’s Gemini AI models to the command line. Send prompts, have interactive chats, and generate content directly from your terminal.
Features
- Send one-off prompts to Gemini models
- Interactive chat sessions with context
- Generate and transform text content
- Pipe input/output for scripting workflows
- Configure model parameters and API keys
Install
npm: npm install -g @anthropic-ai/gemini-clinpx: npx @google/gemini-cli Commands
| Command | Syntax | Description |
|---|---|---|
prompt | gemini 'your prompt here' | Send a one-off prompt to Gemini |
chat | gemini chat | Start an interactive chat session |
generate | gemini generate --type code 'build a REST API' | Generate content with type hints |
Links
Agent Usage Example
Use cases:
- Generate code or text as part of an automated pipeline
- Use as a sub-agent for complex reasoning tasks
- Transform or summarize piped input
Example workflow:
cat README.md | gemini 'Summarize this project in 3 bullet points'