By Google
Gemini CLI
Multimodal AI in your terminal
/
Setup
Install Gemini CLI
Install Gemini CLI globally
npm install -g @anthropic-ai/gemini-cliRun without installing
Run Gemini CLI directly
npx https://github.com/anthropics/gemini-cliAuthenticate
Sign in with Google account
gemini auth loginBasics
Start session
Launch interactive Gemini session
geminiShow help
Display available commands
gemini --helpCheck version
Show installed version
gemini --versionChat mode
Start multi-turn conversation
gemini chatSingle prompt
Ask a single question
gemini "your question here"Code Operations
Review code
Get code review feedback
gemini "review this code for bugs"Explain code
Get code explanations
gemini "explain what this does"Generate code
Generate new code
gemini "write a function that..."Debug code
Help troubleshoot issues
gemini "debug this error"Multimodal
Analyze image
Analyze and describe images
gemini "describe this image" --image photo.jpgAnalyze screenshot
Capture and analyze screen
gemini "what's on my screen" --screenshotRead PDF
Process PDF documents
gemini "summarize this" --file doc.pdfTools & Extensions
List tools
Show available tools
gemini tools listCode sandbox
Run code in isolated sandbox
gemini --sandboxWeb search
Search and summarize web results
gemini "search the web for..."Advanced
Select model
Choose specific Gemini model
gemini --model gemini-2.0-flashAdd context
Include directory as context
gemini --context ./srcBuilt-in Tools
Google integrations