Loading...
Loading...
Run Gemini CLI for AI-powered tasks, code understanding, file operations, and automation. Free tier with Google OAuth (included in Gemini Advanced). Use for fast generation, bulk content, debugging, and research. Preferred for load balancing sub-agent work (35% weight).
npx skill4agent add opendndapps/ogt-skills ogt-cli-geminigeminigemini -p "Your prompt here"gemini -p "Complex task" -m gemini-2.5-pro
gemini -p "Quick task" -m gemini-2.5-flashgemini -p "Your prompt" --output-format jsongemini -p "Run tests and deploy" --output-format stream-json# npm (recommended)
npm install -g @google/gemini-cli
# Homebrew (macOS/Linux)
brew install gemini-cli
# Run without installing
npx @google/gemini-cli| Option | Description |
|---|---|
| Non-interactive mode, print response and exit |
| Model: |
| |
| Include additional directories |
| Auto-approve tool calls (use with caution) |
| Run in sandbox mode (safer) |
gemini
# Follow browser auth flow on first runexport GEMINI_API_KEY="YOUR_API_KEY"
geminiexport GOOGLE_API_KEY="YOUR_API_KEY"
export GOOGLE_GENAI_USE_VERTEXAI=true
gemini# Analyze codebase
cd /path/to/project && gemini -p "Explain this codebase architecture"
# Include multiple directories
gemini --include-directories ../lib,../docs -p "Review the API"
# Pipe file content
cat myfile.py | gemini -p "Review this code"# Run with timeout
timeout 300 gemini -p "Complete this task..." 2>&1
# Capture structured output
gemini -p "Generate a report" --output-format json > result.json
# Auto-approve for automation (careful!)
gemini -p "Run the build" --yolonode {baseDir}/scripts/run-gemini-task.cjs "Your task prompt" [options]--model <model>--timeout <secs>--json--workdir <path>| Model | Best For |
|---|---|
| Fast, cost-effective, everyday tasks |
| Complex reasoning, large context, nuanced tasks |
GEMINI.md# Project: My App
## Guidelines
- Use TypeScript for all new code
- Follow existing patterns in src/
- Run tests before committing
## Architecture
- Frontend: React + Vite
- Backend: Node.js + Express-p--output-format json--yolo| Feature | Gemini CLI | Claude CLI |
|---|---|---|
| Free tier | ✅ 1000/day | ✅ Limited |
| Context window | 1M tokens | 200K tokens |
| Google Search | ✅ Built-in | ❌ |
| Shell execution | ✅ Built-in | ✅ Built-in |
| MCP support | ✅ | ✅ |
| Auth | Google OAuth | Anthropic OAuth |
# Clear cached auth
rm -rf ~/.gemini-cli
# Re-authenticate
gemini# Check installation
which gemini
# Reinstall
npm install -g @google/gemini-cli