Reference · Reference
Gemini CLI Commands List
Search and copy Gemini CLI commands by category: slash commands, CLI flags, keyboard shortcuts, and @ / ! commands. One-click copy for quick terminal use.
Last updated:
How to Use
Expand how to useCollapse how to use
- 1
Search commands
Type a keyword to filter commands, flags, options, and examples all at once.
- 2
Filter by category
Switch between Slash Commands, CLI Flags, Keyboard Shortcuts, and @ & ! Commands to focus on what you need.
- 3
Copy and run
Click the copy button on any command card or shortcut row to paste it directly into your terminal.
Latest Version
This cheat sheet covers Gemini CLI v0.56.0 (August 2026). Command set includes slash commands, CLI flags, keyboard shortcuts, and @ / ! operators.
v0.57.0 (August 25, 2026)
- Re-verified against v0.57.0 (released August 25, 2026). All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and the @ / ! operators are unchanged from v0.56.0 (no command headings added or removed in the official docs, and both tags define the same 43 yargs options)
- The official
/cleardocumentation was corrected: beyond clearing the screen,/clearresets the active conversation context and starts a new session. The docs now also state that Ctrl+L only redraws the screen and preserves the conversation context, so the two are not equivalent (a documentation fix for long-standing behavior, not an implementation change) - Stable releases continue for Google Code Assist Standard/Enterprise even after the June 18, 2026 end of support for free, AI Pro, and Ultra users
v0.56.0 (August 19, 2026)
- Verified on v0.56.0 (released August 19, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.55.1
- This release only bumps package version numbers — the official docs (command list, keyboard shortcuts) and the CLI flag definitions are identical to v0.55.1 (zero differences confirmed)
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
Slash Commands
/help
Notes
- Alias: /?
Examples
/helpDisplay available commands and usage./resume
Notes
- list
- save <tag>
- resume <tag>
- delete <tag>
- share [file]
- checkpoints
Examples
/resumeOpen the interactive session browser./chat
Notes
- list
- save <tag>
- resume <tag>
- delete <tag>
- share [file]
- debug
Examples
/chat save my-featureSave the current conversation with a tag./restore
Notes
- [tool_call_id]
Examples
/restoreUndo the last file changes made by a tool./rewind
Examples
/rewindStep back through previous interactions./model
Notes
- manage
- set <model-name>
Examples
/model set gemini-2.5-proSwitch to a specific Gemini model./settings
Examples
/settingsOpen the interactive settings panel./theme
Examples
/themeCycle through available themes./auth
Examples
/authSwitch to a different auth provider or account./editor
Examples
/editorChoose your preferred text editor./terminal-setup
Examples
/terminal-setupSet up keybindings for your terminal emulator./agents
Notes
- list
- reload
- enable <name>
- disable <name>
- config <name>
Examples
/agents listShow all available sub-agents./extensions
Notes
- list
- install
- enable/disable
- update
- uninstall
- explore
Examples
/extensions listList installed extensions./skills
Notes
- list
- enable <name>
- disable <name>
- reload
Examples
/skills listShow available agent skills./tools
Notes
- desc
Examples
/toolsShow all tools available in the current session./mcp
Notes
- list
- desc
- schema
- enable/disable
- reload
- auth <server>
Examples
/mcp listShow all configured MCP servers./commands
Notes
- list
- reload
Examples
/commands listShow available custom slash commands./memory
Notes
- list
- show
- refresh
Examples
/memory refreshReload GEMINI.md context without restarting./init
Examples
/initCreate a project-level GEMINI.md file./clear
Examples
/clearReset the conversation context and start a new session./copy
Examples
/copyCopy the most recent response to clipboard./compress
Examples
/compressSummarize conversation to free up context window./stats
Notes
- session
- model
- tools
Examples
/statsDisplay token usage and session metrics./vim
Examples
/vimSwitch input between standard and vim mode./shells
Examples
/shellsShow or hide background shell output./directory
Notes
- add <path>
- show
Examples
/directory add ./srcAdd an additional workspace directory./about
Examples
/aboutDisplay Gemini CLI version and environment info./docs
Examples
/docsOpen official docs in the default browser./upgrade
Examples
/upgradeOpen the upgrade / release page./privacy
Examples
/privacyDisplay the privacy policy notice./bug
Examples
/bugOpen a pre-filled GitHub issue form./permissions
Notes
- trust [path]
Examples
/permissions trust ./projectMark a folder as trusted./hooks
Notes
- list/show/panel
- enable <name>
- disable <name>
- enable-all
- disable-all
Examples
/hooks listShow configured lifecycle hooks./policies
Notes
- list
Examples
/policies listShow active policy rules./plan
Notes
- copy
Examples
/planEnter read-only planning mode./ide
Notes
- enable/disable
- install
- status
Examples
/ide statusCheck IDE integration status./setup-github
Examples
/setup-githubSet up Gemini CLI in GitHub Actions./quit
Notes
- --delete (removes history)
Examples
/quitExit the current Gemini CLI session.CLI Flags
--model
Notes
- Alias: -m
- Default: auto
Examples
gemini -m gemini-2.5-proLaunch with a specific model.--prompt
Notes
- Alias: -p
Examples
gemini -p "explain this repo"Run a one-shot prompt.--prompt-interactive
Notes
- Alias: -i
Examples
gemini -i "summarize the codebase"Start with a prompt and keep the session open.--worktree
Notes
- Alias: -w
Examples
gemini --worktreeIsolate changes in a separate worktree.--sandbox
Notes
- Alias: -s
Examples
gemini --sandboxStart Gemini CLI in sandbox mode.--skip-trust
Examples
gemini --skip-trustSkip the folder trust check on launch.--approval-mode
Notes
- choices: default, auto_edit, yolo, plan
Examples
gemini --approval-mode=auto_editAutomatically approve file edits.--yolo
Notes
- Alias: -y
- Deprecated: prefer --approval-mode=yolo
Examples
gemini --yoloRun with full auto-approval (use with caution).--acp
Examples
gemini --acpLaunch in ACP mode for compatible editors to connect.--experimental-acp
Notes
- Deprecated: use --acp
Examples
gemini --experimental-acpLegacy flag for launching ACP mode.--policy
Examples
gemini --policy ./policiesLoad extra policies for the Policy Engine.--admin-policy
Examples
gemini --admin-policy ./admin-policiesLoad organization-level admin policies.--allowed-mcp-server-names
Examples
gemini --allowed-mcp-server-names=github,jiraRestrict active MCP servers to a whitelist.--extensions
Notes
- Alias: -e
Examples
gemini --extensions=my-extLaunch with a specific extension enabled.--list-extensions
Notes
- Alias: -l
Examples
gemini --list-extensionsShow all installable extensions.--resume
Notes
- Alias: -r
- Accepts "latest" or an index number
Examples
gemini --resumeContinue the most recent session.--session-file
Examples
gemini --session-file ./session.jsonLoad a previously exported session file.--session-id
Examples
gemini --session-id 123e4567-e89b-12d3-a456-426614174000Begin a new session with a specific UUID.--list-sessions
Examples
gemini --list-sessionsShow saved sessions for this project.--delete-session
Examples
gemini --delete-session 2Remove session number 2 from the list.--include-directories
Examples
gemini --include-directories=../sharedAdd a shared directory to the workspace.--screen-reader
Examples
gemini --screen-readerStart Gemini CLI in screen reader mode.--output-format
Notes
- Alias: -o
- choices: text, json, stream-json
Examples
gemini --output-format=json -p "analyze this"Get a structured JSON response.--raw-output
Examples
gemini --raw-outputShow output unsanitized (use with caution).--accept-raw-output-risk
Examples
gemini --raw-output --accept-raw-output-riskEnable raw output without the warning prompt.--debug
Notes
- Alias: -d
Examples
gemini --debugStart with detailed debug output.--version
Notes
- Alias: -v
Examples
gemini --versionDisplay the installed Gemini CLI version.--help
Notes
- Alias: -h
Examples
gemini --helpDisplay all available flags and options.Keyboard Shortcuts
@ & ! Commands
@<path>
Examples
@src/index.ts explain this fileAdd a file to context and ask about it.@
!<command>
Examples
!ls -laRun a shell command without leaving the session.!
Version Notes
Summarized from official Gemini CLI GitHub releases.
- Re-verified against v0.57.0 (released August 25, 2026). All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and the @ / ! operators are unchanged from v0.56.0 (no command headings added or removed in the official docs, and both tags define the same 43 yargs options)
- The official
/cleardocumentation was corrected: beyond clearing the screen,/clearresets the active conversation context and starts a new session. The docs now also state that Ctrl+L only redraws the screen and preserves the conversation context, so the two are not equivalent (a documentation fix for long-standing behavior, not an implementation change) - Stable releases continue for Google Code Assist Standard/Enterprise even after the June 18, 2026 end of support for free, AI Pro, and Ultra users
- Verified on v0.56.0 (released August 19, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.55.1
- This release only bumps package version numbers — the official docs (command list, keyboard shortcuts) and the CLI flag definitions are identical to v0.55.1 (zero differences confirmed)
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.55.1 (released August 11, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.54.4
- This release contains only security fixes around core, a2a-server, and sandbox plus internal bug fixes in session handling and OAuth — the command data was re-checked against the
--helpoutput and the official docs headings with zero differences - Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.54.4 (released August 7, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.54.0
- This release only fixes a bug where a new user message could fuse into an unanswered tool response, plus release-process version bumps and a revert — no changes to the user-facing command surface (only 0.54.0 and 0.54.4 were published to npm in the 0.54.x line)
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.54.0 (released August 6, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.53.1
- This release contains only security hardening — session ID rotation on model fallback, enforced HTTPS for the Google credentials auth provider, and explicit tag-length validation in the file keychain — plus internal bug fixes, with no changes to the user-facing command surface
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.53.1 (released July 31, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.53.0
- This release contains only internal bug fixes around ACP session handling, non-interactive CLI sessions, geminiChat history, and telemetry — no changes to the user-facing command surface
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.53.0 (released July 28, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.52.0
- This release focuses on security fixes, internal refactoring, and the addition of an evals feature — no changes to the user-facing command surface
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.52.0 (released July 22, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.51.0
- This release focuses on small core fixes (bypassing LLM correction for JSON/IPYNB files in write_file and replace, simplifying Plan Mode's write policy for relative paths, clearer shared-project quota limit error messages) and internal tooling additions — no changes to the user-facing command surface
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.51.0 (released July 16, 2026), a stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.50.0
- This release focuses on security fixes (case-insensitive sensitive-path blocklist, resolving a symbolic-link directory escape in the memory import processor) and core fixes — no changes to the user-facing command surface
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.50.0 (released July 8, 2026), the latest stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.47.0
- This release is mostly internal fixes to CI release verification and tool registry improvements — no changes to the user-facing command surface
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Verified on v0.49.0 (released June 25, 2026), a stable release. All 38 slash commands, 28 CLI flags, 25 keyboard shortcuts, and @ / ! operators are unchanged from v0.47.0
- This release is mostly internal refactoring, CI fixes, and bug fixes — no changes to the user-facing command surface
- Stable releases continue for Google Code Assist Standard/Enterprise users even after the free tier / AI Pro / Ultra shutdown on June 18, 2026
- Latest stable release verified on v0.47.0, covering the full command set: slash commands (/resume, /chat, /memory, /tools, /mcp, /hooks, /plan, etc.), CLI flags, keyboard shortcuts, and @ / ! operators
- Expanded session management: load from JSON with --session-file and start with a fixed UUID via --session-id. Conversation management is now under /resume (canonical), with /chat as an alias
- Adds Policy Engine integration (--policy / --admin-policy), stable ACP mode (--acp), and raw output (--raw-output / --accept-raw-output-risk). --experimental-zed-integration was removed
- Stable release verified on v0.45.3, covering the full command set: slash commands (/chat, /memory, /tools, /mcp, /hooks, /plan, etc.), CLI flags, keyboard shortcuts, and @ / ! operators
- Enhanced session management: list and delete sessions with --list-sessions and --delete-session, plus export/import sessions to file
- Includes git worktree integration (--worktree / -w), ACP mode (--experimental-acp), and JSON/stream-json output (--output-format)
- Covers the full command set: slash commands (/chat, /memory, /tools, /mcp, /hooks, /plan, etc.), CLI flags (--model, --approval-mode, --yolo, --output-format, etc.), keyboard shortcuts, and @ / ! operators
- Session management via /chat with save, resume, share, and debug subcommands
- Approval mode control: default, auto_edit, yolo, plan — also toggleable with Ctrl+Y and Shift+Tab shortcuts
- MCP server management via /mcp with enable, disable, auth, and reload subcommands
- Hook lifecycle management via /hooks for before/after tool execution
- Extension and skill system: /extensions and /skills for expanding Gemini CLI capabilities
About This Tool
This free Gemini CLI cheat sheet consolidates all slash commands, CLI flags, keyboard shortcuts, and @ / ! operators for Gemini CLI v0.55.1 into one searchable, copyable reference. Gemini CLI is Google's open-source terminal agent powered by Gemini models — it lets you chat, edit code, run shell commands, manage MCP servers, and automate tasks directly from your terminal. Use the category filter to focus on the command type you need, the search box to match by keyword, and the copy button to paste any command without leaving your current context. Note: Gemini CLI was shut down on June 18, 2026, and its successor is Google Antigravity CLI (agy); you can migrate Gemini CLI extensions with agy plugin import gemini (see related tools for the Antigravity CLI commands).
What You Can Check
- All 38 slash commands (/chat, /memory, /mcp, /tools, /hooks, /plan, /init, and more)
- All 28 CLI flags (--model, --approval-mode, --yolo, --sandbox, --output-format, and more)
- 25 keyboard shortcuts for session control, editing, and navigation
- @ file reference and ! shell execution operators with usage examples
- Subcommand lists, option notes, and practical examples for each entry
When It Helps
- Looking up the correct /chat subcommand (save, resume, share) while working on a long coding session
- Checking which --approval-mode value (default, auto_edit, yolo, plan) suits your current task before running Gemini CLI
- Finding the keyboard shortcut for toggling YOLO mode or opening the external editor mid-session
- Referencing @ file injection syntax when you want to include source files in your Gemini prompt
- Onboarding a teammate to Gemini CLI by sharing a quick reference of the most important commands
- Confirming the correct /mcp subcommand (enable, disable, auth, reload) when setting up MCP server integration
FAQ
What is Gemini CLI?
Gemini CLI is Google's open-source AI agent for the terminal, powered by Gemini models. It lets you chat, read and edit files, run shell commands, integrate MCP servers, and automate development tasks — all from your terminal without leaving your workflow.
How do I install Gemini CLI?
Install Gemini CLI globally via npm: `npm install -g @google/gemini-cli`. After installation, run `gemini` to start an interactive session. You will be prompted to authenticate with your Google account on first use.
What are slash commands in Gemini CLI?
Slash commands are in-session commands you type while chatting with Gemini. They control session management (/chat, /restore, /rewind), tool integrations (/mcp, /tools, /extensions), settings (/settings, /theme, /model), and utilities (/clear, /copy, /stats). Type /help to see the full list.
What is the difference between @ and ! in Gemini CLI?
@<path> injects the content of a file or directory into the current prompt context, letting Gemini read and reason about local files. !<command> executes a shell command directly from within Gemini CLI. A standalone ! toggles shell mode for continuous shell execution.
How does --approval-mode work?
The --approval-mode flag controls how Gemini asks for permission before running tools: default requires approval for risky actions, auto_edit automatically approves file edits, yolo approves all actions without prompting, and plan enters read-only planning mode. You can also toggle YOLO mode with Ctrl+Y during a session.
What is YOLO mode (--yolo)?
--yolo runs Gemini CLI with all tool actions auto-approved, equivalent to --approval-mode=yolo. It is now recommended to use --approval-mode=yolo instead, as --yolo is marked deprecated. Use with caution — Gemini will execute commands without asking for confirmation.
How do I save and resume a conversation?
Use /chat save <tag> to save the current conversation with a custom tag. Resume it later with /chat resume <tag> or view all saved sessions with /chat list. You can also share a session with /chat share, or resume from the CLI with --resume.
What is GEMINI.md and how does /memory work?
GEMINI.md is a project-level context file that Gemini CLI loads automatically. /memory lets you manage this context: /memory list shows loaded context files, /memory show displays their content, and /memory refresh reloads them without restarting. Use /init to generate a GEMINI.md for your project.
Does this tool store any data I enter?
No. This cheat sheet is a static reference page. No commands, text, or clipboard data are sent to any server. All filtering and copying happen entirely in your browser.