npm install -g @google/gemini-cliInstall Gemini CLI globally with npm.
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.
51 commands shown
npm install -g @google/gemini-cliInstall Gemini CLI globally with npm.
gemini updateUpdate Gemini CLI to the latest available version.
geminiStart an interactive Gemini CLI session in the current directory.
gemini "Explain this project"Start interactively with an initial query.
gemini -p "Summarize README.md"Run one non-interactive prompt and print the response.
Also: --prompt · non-interactive
cat build.log | gemini -p "Find the failure"Pipe input into a non-interactive prompt.
Also: stdin · pipe
gemini -i "Review the current changes"Run an initial prompt, then continue in interactive mode.
Also: --prompt-interactive
gemini -r "latest"Resume the most recent session for the current project.
Also: --resume
gemini --list-sessionsList saved sessions for the current project and exit.
gemini -r "<session-id>" "Finish this PR"Resume a specific saved session with a new query.
gemini --model <model-name>Choose the model for this invocation.
Also: -m
gemini --debugEnable verbose debugging output.
Also: -d
gemini -p "Summarize the repo" --output-format jsonReturn structured JSON from a non-interactive prompt.
Also: json output · automation
gemini --include-directories ../shared,../docsAdd other directories to the workspace context for this run.
/helpShow available interactive commands and their usage.
Also: /?
/aboutShow Gemini CLI version information for diagnostics.
/clearClear the visible terminal history and scrollback.
Also: Ctrl+L
/compressReplace the current chat context with a summary.
/docsOpen the official Gemini CLI documentation.
/model set <model-name> --persistSelect a model and optionally persist it for future sessions.
/settingsOpen the validated settings editor.
/statsShow session, model, and tool usage statistics.
/themeOpen the interactive theme selector.
/quitExit the current Gemini CLI session.
Also: /exit
@src/ Explain this codeInject a file or directory into the prompt as context, with git-aware filtering.
Also: @<path> · context file · read files
/initAnalyze the current directory and generate a tailored GEMINI.md context file.
/memory showDisplay the hierarchical memory currently loaded from GEMINI.md files.
/memory reloadReload GEMINI.md context after editing memory files.
/toolsList tools available in the current session.
/tools descList active tools with full descriptions.
Also: /tools descriptions
!git statusRun one shell command directly and keep its output in session context.
Also: !<shell-command> · background process
/shellsOpen the background shells view for long-running processes.
Also: /bashes · background process
gemini mcp add <name> <command>Add a stdio MCP server to project settings.
gemini mcp add <name> <url> --transport httpAdd a Streamable HTTP MCP server.
gemini mcp listList configured MCP servers and connection errors from the terminal.
/mcp listList configured MCP servers and tools in an active session.
Also: /mcp ls
/mcp reloadReconnect MCP servers and refresh their available tools.
gemini mcp remove <name>Remove an MCP server from the selected settings scope.
gemini extensions listList installed Gemini CLI extensions.
gemini extensions install <source>Install an extension from a Git URL or local path.
/extensions restartRestart extensions after configuration changes.
/skills listList discovered agent skills and their enabled state.
/commands listList custom command TOML files from user, project, MCP, and extension sources.
/commands reloadReload custom commands without restarting Gemini CLI.
~/.gemini/commands/review.tomlUser-level path for a reusable custom command named /review.
Also: global custom commands
.gemini/commands/git/commit.tomlProject-level path for a namespaced custom command named /git:commit.
Also: project custom commands
gemini --sandboxRun tool executions inside the configured sandbox.
Also: -s
gemini --approval-mode defaultUse normal confirmation prompts for mutating tool calls.
gemini --approval-mode planUse read-only planning behavior for tool calls when supported.
gemini --approval-mode yoloAutomatically approve every tool call for this invocation.
Also: --yolo
gemini --skip-trustTrust the current workspace for this invocation without the folder trust check.
Gemini CLI changes quickly. These primary references were checked on July 31, 2026; use them for the latest edge cases and release-specific behavior.
Enter a command, task, alias, or concept such as resume, MCP, model, or context file.
Choose a category or show only common commands to narrow the reference.
Confirm whether the command runs in your terminal, inside Gemini CLI, or directly at the prompt.
Copy one exact example or export the currently visible reference for your notes.
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.
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.
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.
Type @ followed by a file or directory path, then add your request. Gemini CLI injects the matching content with git-aware filtering.
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.
Tornic turns Claude, Codex, Cursor, and Gemini CLI tasks into deterministic visual workflows with clear steps and human gates.
Explore Tornic