Reference for Gemini CLI usage patterns. Consult before calling gemini via Bash.
Quick reference for Gemini CLI commands.
gemini "[prompt]" -m gemini-3-flash-preview -o text 2>&1
| Flag | Purpose |
|------|---------|
| -m gemini-3-flash-preview | Model selection |
| -o text | Human-readable output |
| -o json | Structured output with stats |
| -r [index] | Resume session by index |
| --allowed-tools | Restrict available tools |
| --list-sessions | List available sessions |
# List sessions
gemini --list-sessions
# Resume by index
echo "follow-up prompt" | gemini -r 1 -m gemini-3-flash-preview -o text 2>&1
dangerouslyDisableSandbox: true for Bash calls2>&1 to capture all outputEPERM errors: Gemini needs write access to ~/.gemini/tmp/ - use dangerouslyDisableSandbox: true
File access: Gemini can only read files in the workspace directory (project root)
Rate limits: Free tier is 60/min, 1000/day. CLI auto-retries with backoff.
gemini --helpSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer