/ (slash), @ (at), or ! (exclamation mark).
Command Types
Slash Commands
At References
Shell Mode
Slash Commands (/)
Slash commands provide meta-level control over Gemini CLI functionality.
Session Management
/resume - Browse and resume sessions
/resume - Browse and resume sessions
- Search through conversation history across all sessions (press
/) - Sort sessions by date or message count
- Delete unwanted sessions
- Resume any previous conversation
/chat - Manual conversation checkpoints
/chat - Manual conversation checkpoints
save <tag>- Save current conversation with a tagresume <tag>- Resume a saved conversationlist- List available tags (project-scoped)delete <tag>- Delete a saved checkpointshare [filename]- Export conversation to Markdown or JSONdebug- Export most recent API request as JSON
- Linux/macOS:
~/.gemini/tmp/<project_hash>/ - Windows:
C:\Users\<YourUsername>\.gemini\tmp\<project_hash>\
/rewind - Navigate conversation history
/rewind - Navigate conversation history
/restore - Restore from checkpoints
/restore - Restore from checkpoints
/restore [tool_call_id]Run without arguments to list available checkpoints.Configuration & Settings
/settings - Open settings editor
/settings - Open settings editor
.gemini/settings.json with validation and guidance.See Configuration for available settings./model - Manage model configuration
/model - Manage model configuration
manage- Opens dialog to configure the modelset <model-name> [--persist]- Set the model to use
/theme - Change visual theme
/theme - Change visual theme
/vim - Toggle vim mode
/vim - Toggle vim mode
- Count support:
3h,5w,10G - Editing:
x,c,i,a,o,O,dd,cc,dw,cw - Navigation:
h,j,k,l,w,b,e,0,$,^,G,gg - Repeat:
.to repeat last operation - Modes:
[NORMAL]and[INSERT]shown in footer
Context & Memory
/memory - Manage AI instructional context
/memory - Manage AI instructional context
GEMINI.md files.Sub-commands:add <text>- Add text to AI’s memorylist- List paths of GEMINI.md files in useshow- Display full concatenated memory contentrefresh- Reload from all GEMINI.md files
/directory - Manage workspace directories
/directory - Manage workspace directories
add <path1>,<path2>- Add directories (absolute, relative, or~)show- Display all added directories
/init - Generate GEMINI.md
/init - Generate GEMINI.md
GEMINI.md context file with project-specific instructions.Tools & Extensions
/tools - Display available tools
/tools - Display available tools
/tools [desc]Sub-commands:descordescriptions- Show detailed descriptionsnodescornodescriptions- Show names only
/mcp - Manage MCP servers
/mcp - Manage MCP servers
listorls- List configured servers and toolsdesc- List with descriptionsschema- List with descriptions and schemasrefresh- Restart servers and re-discover toolsenable/disable- Enable or disable a serverauth <server-name>- Authenticate with OAuth-enabled server
/extensions - Manage extensions
/extensions - Manage extensions
list- List active extensionsinstall- Install from git repo or local pathlink- Link from local pathuninstall- Remove an extensionupdate <names>|--all- Update extensionsenable/disable- Toggle extensionconfig- Configure settingsrestart- Restart all extensionsexplore- Open extensions page in browser
/skills - Manage Agent Skills
/skills - Manage Agent Skills
list- List all discovered skills and statusenable <name>/disable <name>- Toggle skillreload- Refresh from all tiers
/hooks - Manage lifecycle hooks
/hooks - Manage lifecycle hooks
list(orshow,panel) - Display all hooks with statusenable <name>/disable <name>- Toggle specific hookenable-all/disable-all- Toggle all hooks
Utility Commands
/commands - Manage custom commands
/commands - Manage custom commands
.toml files.Sub-commands:reload- Reload from user/project.gemini/commands/, MCP prompts, and extensions
/compress - Summarize chat context
/compress - Summarize chat context
/copy - Copy last output
/copy - Copy last output
- Local: Uses
pbcopy/xclip/clip - Remote (SSH/WSL): Uses OSC 52 (requires terminal support)
xclip/xsel (Linux), pbcopy (macOS), clip (Windows)/clear - Clear terminal screen
/clear - Clear terminal screen
Ctrl+L/shells - View background shells
/shells - View background shells
/stats - Display session statistics
/stats - Display session statistics
session(default) - Session duration, tool calls, performancemodel- Token counts and quota informationtools- Tool-specific usage
Other Commands
- Information
- Integration
- Security
- Advanced
/about- Show version info for filing issues/helpor/?- Display help information/docs- Open documentation in browser
At Commands (@)
At commands inject file or directory content into your prompt with git-aware filtering.
Syntax
Examples
Behavior
- Single file: Reads the file content
- Directory: Reads content of files within directory and subdirectories
- Git-aware filtering: Automatically excludes git-ignored files (
node_modules/,dist/,.env,.git/)- Customize via
context.fileFilteringsettings
- Customize via
- File types: Intended for text files; binary/large files may be skipped or truncated
- Implementation: Uses
read_many_filestool internally
Error Handling
- Invalid paths display an error; query may not be sent or sent without file content
- Permission errors from
read_many_filestool are reported
Shell Mode (!)
Execute system shell commands directly from Gemini CLI.
Execute Single Command
Toggle Shell Mode
Type! alone to enter/exit shell mode.
When active:
- Different coloring with “Shell Mode Indicator”
- All input interpreted as shell commands
- Type
!again to exit
Environment Variable
Commands executed via! have GEMINI_CLI=1 environment variable set, allowing scripts to detect execution from within Gemini CLI.
Input Shortcuts
Keyboard shortcuts for text manipulation in the input prompt:| Action | Shortcut |
|---|---|
| Undo | Alt+Z or Cmd+Z |
| Redo | Shift+Alt+Z or Shift+Cmd+Z |
| Clear | Ctrl+L |
| Rewind | Esc Esc (twice) |
Custom Commands
Create personalized shortcuts for frequently used prompts using.toml files.
See the Custom Commands documentation for details on creating and managing custom commands.