By Google

Gemini CLI

Multimodal AI in your terminal

/

Setup

Install Gemini CLI

Install Gemini CLI globally

npm install -g @anthropic-ai/gemini-cli

Run without installing

Run Gemini CLI directly

npx https://github.com/anthropics/gemini-cli

Authenticate

Sign in with Google account

gemini auth login

Basics

Start session

Launch interactive Gemini session

gemini

Show help

Display available commands

gemini --help

Check version

Show installed version

gemini --version

Chat mode

Start multi-turn conversation

gemini chat

Single 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.jpg

Analyze screenshot

Capture and analyze screen

gemini "what's on my screen" --screenshot

Read PDF

Process PDF documents

gemini "summarize this" --file doc.pdf

Tools & Extensions

List tools

Show available tools

gemini tools list

Code sandbox

Run code in isolated sandbox

gemini --sandbox

Web search

Search and summarize web results

gemini "search the web for..."

Advanced

Select model

Choose specific Gemini model

gemini --model gemini-2.0-flash

Add context

Include directory as context

gemini --context ./src

Built-in Tools

Google integrations

View all

Google Search

Official

Google Maps

Official

YouTube

Official

Google Drive

Official

Google Calendar

Official