/) and can be used to manage your session, customize the interface, and control Gemini CLI behavior.
Built-in Commands
/about
Show version info. Share this information when filing issues./auth
Open a dialog that lets you change the authentication method./bug
File an issue about Gemini CLI. By default, the issue is filed within the GitHub repository for Gemini CLI.The headline for the bug being filed
The default
/bug behavior can be modified using the advanced.bugCommand setting in your .gemini/settings.json file./chat
Save and resume conversation history for branching conversation state interactively, or resuming a previous state from a later session.Subcommands
Export the most recent API request as a JSON payload
Deletes a saved conversation checkpointUsage:
/chat delete <tag>Lists available tags for chat state resumption
This command only lists chats saved within the current project. Because chat history is project-scoped, chats saved in other project directories will not be displayed.
Resumes a conversation from a previous saveUsage:
/chat resume <tag>You can only resume chats that were saved within the current project. To resume a chat from a different project, you must run the Gemini CLI from that project’s directory.
Saves the current conversation history. You must add a
<tag> for identifying the conversation stateUsage: /chat save <tag>Checkpoint locations:- Linux/macOS:
~/.gemini/tmp/<project_hash>/ - Windows:
C:\Users\<YourUsername>\.gemini\tmp\<project_hash>\
Chats are saved into a project-specific directory, determined by where you run the CLI. Consequently, saved chats are only accessible when working within that same project. These checkpoints are for manually saving and resuming conversation states. For automatic checkpoints created before file modifications, see the Checkpointing documentation.
Writes the current conversation to a provided Markdown or JSON fileUsage:
/chat share [filename]If no filename is provided, the CLI will generate one./clear
Clear the terminal screen, including the visible session history and scrollback within the CLI./commands
Manage custom slash commands loaded from.toml files.
Subcommands
Reload custom command definitions from all sources (user-level
~/.gemini/commands/, project-level <project>/.gemini/commands/, MCP prompts, and extensions)Usage: /commands reloadUse this to pick up new or modified .toml files without restarting the CLI./compress
Replace the entire chat context with a summary. This saves on tokens used for future tasks while retaining a high level summary of what has happened./copy
Copies the last output produced by Gemini CLI to your clipboard, for easy sharing or reuse.- Local sessions use system clipboard tools (pbcopy/xclip/clip)
- Remote sessions (SSH/WSL) use OSC 52 and require terminal support
/directory (or /dir)
Manage workspace directories for multi-directory support.Subcommands
Add a directory to the workspaceUsage:
/directory add <path1>,<path2>The path can be absolute or relative to the current working directory. Moreover, the reference from home directory is supported as well.Display all directories added by
/directory add and --include-directoriesUsage: /directory show/docs
Open the Gemini CLI documentation in your browser./editor
Open a dialog for selecting supported editors./extensions
Manage extensions. See Gemini CLI Extensions.Subcommands
Configure extension settings
Disable an extension
Enable an extension
Open extensions page in your browser
Install an extension from a git repo or local path
Link an extension from a local path
List active extensions
Restart all extensions
Uninstall an extension
Update extensionsUsage:
/extensions update <extension-names>|--all/help (or /?)
Display help information about Gemini CLI, including available commands and their usage./hooks
Manage hooks, which allow you to intercept and customize Gemini CLI behavior at specific lifecycle events.Subcommands
Disable all enabled hooks
Disable a hook by nameUsage:
/hooks disable <hook-name>Enable all disabled hooks
Enable a hook by nameUsage:
/hooks enable <hook-name>Display all registered hooks with their statusAliases:
show, panel/ide
Manage IDE integration.Subcommands
Disable IDE integration
Enable IDE integration
Install required IDE companion
Check status of IDE integration
/init
To help users easily create aGEMINI.md file, this command analyzes the current directory and generates a tailored context file, making it simpler for them to provide project-specific instructions to the Gemini agent.
/mcp
Manage configured Model Context Protocol (MCP) servers.Subcommands
Authenticate with an OAuth-enabled MCP serverUsage:
/mcp auth <server-name>If <server-name> is provided, it initiates the OAuth flow for that server. If no server name is provided, it lists all configured servers that support OAuth authentication.List configured MCP servers and tools with descriptions
Disable an MCP server
Enable a disabled MCP server
List configured MCP servers and toolsAlias:
lsThis is the default action if no subcommand is specified.Restarts all MCP servers and re-discovers their available tools
List configured MCP servers and tools with descriptions and schemas
/memory
Manage the AI’s instructional context (hierarchical memory loaded fromGEMINI.md files).
Subcommands
Adds the following text to the AI’s memoryUsage:
/memory add <text to remember>Lists the paths of the GEMINI.md files in use for hierarchical memory
Reload the hierarchical instructional memory from all
GEMINI.md files found in the configured locations (global, project/ancestors, and sub-directories)This command updates the model with the latest GEMINI.md content.Display the full, concatenated content of the current hierarchical memory that has been loaded from all
GEMINI.md filesThis lets you inspect the instructional context being provided to the Gemini model.For more details on how
GEMINI.md files contribute to hierarchical memory, see the Configuration documentation./model
Manage model configuration.Subcommands
Opens a dialog to configure the model
Set the model to useUsage:
/model set <model-name> [--persist]/permissions
Manage folder trust settings and other permissions.Subcommands
Manage folder trust settingsUsage:
/permissions trust [<directory-path>]/plan
Switch to Plan Mode (read-only) and view the current plan if one has been generated.This feature requires the
experimental.plan setting to be enabled in your configuration./policies
Manage policies.Subcommands
List all active policies grouped by mode
/privacy
Display the Privacy Notice and allow users to select whether they consent to the collection of their data for service improvement purposes./quit (or /exit)
Exit Gemini CLI./restore
Restores the project files to the state they were in just before a tool was executed. This is particularly useful for undoing file edits made by a tool.The ID of the tool call to restore from. If not provided, lists available checkpoints.
Only available if checkpointing is configured via settings. See Checkpointing documentation for more details.
/resume
Browse and resume previous conversation sessions. Opens an interactive session browser where you can search, filter, and select from automatically saved conversations.- Management: Delete unwanted sessions directly from the browser
- Resume: Select any session to resume and continue the conversation
- Search: Use
/to search through conversation content across all sessions - Session Browser: Interactive interface showing all saved sessions with timestamps, message counts, and first user message for context
- Sorting: Sort sessions by date or message count
All conversations are automatically saved as you chat - no manual saving required. See Session Management for complete details.
/rewind
Navigates backward through the conversation history, letting you review past interactions and potentially revert both chat state and file changes.- Select Interaction: Preview user prompts and file changes
- Action Selection: Choose to rewind history only, revert code changes only, or both
/settings
Open the settings editor to view and modify Gemini CLI settings..gemini/settings.json file, but with validation and guidance to prevent errors.
See the settings documentation for a full list of available settings. Changes to some settings are applied immediately, while others require a restart.
/setup-github
Set up GitHub Actions to triage issues and review PRs with Gemini./shells (or /bashes)
Toggle the background shells view. This allows you to view and manage long-running processes that you’ve sent to the background./skills
Manage Agent Skills, which provide on-demand expertise and specialized workflows.Subcommands
Disable a specific skill by nameUsage:
/skills disable <name>Enable a specific skill by nameUsage:
/skills enable <name>List all discovered skills and their current status (enabled/disabled)
Refresh the list of discovered skills from all tiers (workspace, user, and extensions)
/stats
Display detailed statistics for the current Gemini CLI session.Subcommands
Show session-specific usage statistics, including duration, tool calls, and performance metricsThis is the default view.
Show model-specific usage statistics, including token counts and quota information
Show tool-specific usage statistics
/terminal-setup
Configure terminal keybindings for multiline input (VS Code, Cursor, Windsurf)./theme
Open a dialog that lets you change the visual theme of Gemini CLI./tools
Display a list of tools that are currently available within Gemini CLI.Subcommands
Show detailed descriptions of each tool, including each tool’s name with its full description as provided to the modelAlias:
descriptionsHide tool descriptions, showing only the tool namesAlias:
nodescriptions/vim
Toggle vim mode on or off. When vim mode is enabled, the input area supports vim-style navigation and editing commands in both NORMAL and INSERT modes.- Count support: Prefix commands with numbers (e.g.,
3h,5w,10G) - Editing commands: Delete with
x, change withc, insert withi,a,o,O; complex operations likedd,cc,dw,cw - INSERT mode: Standard text input with escape to return to NORMAL mode
- NORMAL mode: Navigate with
h,j,k,l; jump by words withw,b,e; go to line start/end with0,$,^; go to specific lines withG(orggfor first line) - Persistent setting: Vim mode preference is saved to
~/.gemini/settings.jsonand restored between sessions - Repeat last command: Use
.to repeat the last editing operation - Status indicator: When enabled, shows
[NORMAL]or[INSERT]in the footer
At Commands (@)
At commands are used to include the content of files or directories as part of your prompt to Gemini. These commands include git-aware filtering.@path
Inject the content of the specified file or files into your current prompt.- If a path to a single file is provided, the content of that file is read
- If a path to a directory is provided, the command attempts to read the content of files within that directory and any subdirectories
- Spaces in paths should be escaped with a backslash (e.g.,
@My\ Documents/file.txt) - The command uses the
read_many_filestool internally - Git-aware filtering: By default, git-ignored files (like
node_modules/,dist/,.env,.git/) are excluded. This behavior can be changed via thecontext.fileFilteringsettings. - File types: The command is intended for text-based files. Binary files or very large files might be skipped or truncated by the underlying tool.
@ (Lone at symbol)
If you type a lone@ symbol without a path, the query is passed as-is to the Gemini model. This might be useful if you are specifically talking about the @ symbol in your prompt.
Error handling
- If the path specified after
@is not found or is invalid, an error message will be displayed - If the
read_many_filestool encounters an error (e.g., permission issues), this will also be reported
Shell Mode and Passthrough Commands (!)
The! prefix lets you interact with your system’s shell directly from within Gemini CLI.
!command
Execute the given shell command usingbash on Linux/macOS or powershell.exe -NoProfile -Command on Windows.
! (Toggle shell mode)
Typing! on its own toggles shell mode.
Entering shell mode:
- When active, shell mode uses a different coloring and a “Shell Mode Indicator”
- While in shell mode, text you type is interpreted directly as a shell command
- When exited, the UI reverts to its standard appearance and normal Gemini CLI behavior resumes
Environment variable: When a command is executed via
! or in shell mode, the GEMINI_CLI=1 environment variable is set in the subprocess’s environment. This allows scripts or tools to detect if they are being run from within the Gemini CLI.