Free developer reference

Free Gemini CLI Commands Cheat Sheet

A Gemini CLI commands cheat sheet is a searchable reference for terminal flags, interactive slash commands, session shortcuts, MCP actions, extensions, and copyable examples. This catalog is browser-only and was verified against official Gemini CLI documentation on July 31, 2026.

No signupOfficial sourcesCopy-ready examples

51 commands shown

Setup & launchRun in terminalCommon
npm install -g @google/gemini-cli

Install Gemini CLI globally with npm.

Setup & launchRun in terminalCommon
gemini update

Update Gemini CLI to the latest available version.

Setup & launchRun in terminalCommon
gemini

Start an interactive Gemini CLI session in the current directory.

Setup & launchRun in terminal
gemini "Explain this project"

Start interactively with an initial query.

Setup & launchRun in terminalCommon
gemini -p "Summarize README.md"

Run one non-interactive prompt and print the response.

Also: --prompt · non-interactive

Setup & launchRun in terminal
cat build.log | gemini -p "Find the failure"

Pipe input into a non-interactive prompt.

Also: stdin · pipe

Setup & launchRun in terminal
gemini -i "Review the current changes"

Run an initial prompt, then continue in interactive mode.

Also: --prompt-interactive

SessionsRun in terminalCommon
gemini -r "latest"

Resume the most recent session for the current project.

Also: --resume

SessionsRun in terminalCommon
gemini --list-sessions

List saved sessions for the current project and exit.

SessionsRun in terminal
gemini -r "<session-id>" "Finish this PR"

Resume a specific saved session with a new query.

CLI optionsRun in terminalCommon
gemini --model <model-name>

Choose the model for this invocation.

Also: -m

CLI optionsRun in terminal
gemini --debug

Enable verbose debugging output.

Also: -d

CLI optionsRun in terminal
gemini -p "Summarize the repo" --output-format json

Return structured JSON from a non-interactive prompt.

Also: json output · automation

CLI optionsRun in terminal
gemini --include-directories ../shared,../docs

Add other directories to the workspace context for this run.

Slash commandsRun inside Gemini CLICommon
/help

Show available interactive commands and their usage.

Also: /?

Slash commandsRun inside Gemini CLI
/about

Show Gemini CLI version information for diagnostics.

Slash commandsRun inside Gemini CLICommon
/clear

Clear the visible terminal history and scrollback.

Also: Ctrl+L

Slash commandsRun inside Gemini CLICommon
/compress

Replace the current chat context with a summary.

Slash commandsRun inside Gemini CLI
/docs

Open the official Gemini CLI documentation.

Slash commandsRun inside Gemini CLICommon
/model set <model-name> --persist

Select a model and optionally persist it for future sessions.

Slash commandsRun inside Gemini CLICommon
/settings

Open the validated settings editor.

Slash commandsRun inside Gemini CLI
/stats

Show session, model, and tool usage statistics.

Slash commandsRun inside Gemini CLI
/theme

Open the interactive theme selector.

Slash commandsRun inside Gemini CLICommon
/quit

Exit the current Gemini CLI session.

Also: /exit

Context & memoryType at the promptCommon
@src/ Explain this code

Inject a file or directory into the prompt as context, with git-aware filtering.

Also: @<path> · context file · read files

Context & memoryRun inside Gemini CLICommon
/init

Analyze the current directory and generate a tailored GEMINI.md context file.

Context & memoryRun inside Gemini CLI
/memory show

Display the hierarchical memory currently loaded from GEMINI.md files.

Context & memoryRun inside Gemini CLICommon
/memory reload

Reload GEMINI.md context after editing memory files.

Tools & shellRun inside Gemini CLICommon
/tools

List tools available in the current session.

Tools & shellRun inside Gemini CLI
/tools desc

List active tools with full descriptions.

Also: /tools descriptions

Tools & shellRun inside Gemini CLICommon
!git status

Run one shell command directly and keep its output in session context.

Also: !<shell-command> · background process

Shell commands have the same permissions and impact as your terminal.
Tools & shellRun inside Gemini CLI
/shells

Open the background shells view for long-running processes.

Also: /bashes · background process

MCP serversRun in terminalCommon
gemini mcp add <name> <command>

Add a stdio MCP server to project settings.

MCP serversRun in terminal
gemini mcp add <name> <url> --transport http

Add a Streamable HTTP MCP server.

MCP serversRun in terminalCommon
gemini mcp list

List configured MCP servers and connection errors from the terminal.

MCP serversRun inside Gemini CLICommon
/mcp list

List configured MCP servers and tools in an active session.

Also: /mcp ls

MCP serversRun inside Gemini CLICommon
/mcp reload

Reconnect MCP servers and refresh their available tools.

MCP serversRun in terminal
gemini mcp remove <name>

Remove an MCP server from the selected settings scope.

Extensions & skillsRun in terminalCommon
gemini extensions list

List installed Gemini CLI extensions.

Extensions & skillsRun in terminal
gemini extensions install <source>

Install an extension from a Git URL or local path.

Extensions & skillsRun inside Gemini CLI
/extensions restart

Restart extensions after configuration changes.

Extensions & skillsRun inside Gemini CLI
/skills list

List discovered agent skills and their enabled state.

Custom commandsRun inside Gemini CLICommon
/commands list

List custom command TOML files from user, project, MCP, and extension sources.

Custom commandsRun inside Gemini CLICommon
/commands reload

Reload custom commands without restarting Gemini CLI.

Custom commandsRun in terminal
~/.gemini/commands/review.toml

User-level path for a reusable custom command named /review.

Also: global custom commands

Custom commandsRun in terminal
.gemini/commands/git/commit.toml

Project-level path for a namespaced custom command named /git:commit.

Also: project custom commands

Safety modesRun in terminalCommon
gemini --sandbox

Run tool executions inside the configured sandbox.

Also: -s

Safety modesRun in terminalCommon
gemini --approval-mode default

Use normal confirmation prompts for mutating tool calls.

Safety modesRun in terminal
gemini --approval-mode plan

Use read-only planning behavior for tool calls when supported.

Official documentation marks plan approval mode as under development.
Safety modesRun in terminal
gemini --approval-mode yolo

Automatically approve every tool call for this invocation.

Also: --yolo

Caution: this bypasses normal approval prompts; use only in a deliberately isolated environment.
Safety modesRun in terminal
gemini --skip-trust

Trust the current workspace for this invocation without the folder trust check.

Caution: this bypasses the workspace trust approval; verify the directory first.

Official sources

Gemini CLI changes quickly. These primary references were checked on July 31, 2026; use them for the latest edge cases and release-specific behavior.

How to use this command reference

  1. Step 1

    Search

    Enter a command, task, alias, or concept such as resume, MCP, model, or context file.

  2. Step 2

    Filter

    Choose a category or show only common commands to narrow the reference.

  3. Step 3

    Check context

    Confirm whether the command runs in your terminal, inside Gemini CLI, or directly at the prompt.

  4. Step 4

    Copy

    Copy one exact example or export the currently visible reference for your notes.

Use execution modes deliberately

The default approval mode keeps confirmation prompts for mutating tools. Sandbox untrusted work where possible, review shell commands before running them, and reserve approval-bypass modes for intentionally isolated environments.

Gemini CLI command FAQ

What is the Gemini CLI commands cheat sheet?

It is a searchable quick reference for Gemini CLI terminal options, interactive slash commands, session controls, MCP actions, extensions, custom commands, and safe execution modes.

What is the difference between terminal and interactive commands?

Terminal commands start or configure Gemini CLI from your shell. Interactive commands begin with a slash and run after a Gemini CLI session has started.

How do I include a file in a Gemini CLI prompt?

Type @ followed by a file or directory path, then add your request. Gemini CLI injects the matching content with git-aware filtering.

Is --approval-mode yolo safe?

It bypasses normal tool approval prompts, so it should only be used intentionally in an isolated environment. The default approval mode is the safer general choice.

Turn CLI work into repeatable workflows

Tornic turns Claude, Codex, Cursor, and Gemini CLI tasks into deterministic visual workflows with clear steps and human gates.

Explore Tornic