Skip to content
Unpaid tier and Google One users: Gemini CLI was replaced by Antigravity CLI on June 18th, 2026. To learn more, see our blog post.

Gemini CLI cheatsheet

This page provides a reference for commonly used Gemini CLI commands, options, and parameters.

CommandDescriptionExample
geminiStart interactive REPLgemini
gemini -p "query"Query non-interactivelygemini -p "summarize README.md"
gemini “query”Query and continue interactivelygemini “explain this project”
cat file | geminiProcess piped contentcat logs.txt | gemini
Get-Content logs.txt | gemini
gemini -i "query"Execute and continue interactivelygemini -i "What is the purpose of this project?"
gemini -r "latest"Continue most recent sessiongemini -r "latest"
gemini -r "latest" "query"Continue session with a new promptgemini -r "latest" "Check for type errors"
gemini -r "<session-id>" "query"