Open-source AI agent providing terminal access to Gemini models with extensible tool support and developer-focused features
The Gemini CLI provides a comprehensive set of interactive slash commands for managing conversations, settings, tools, and extensions within the terminal interface.
Essential commands for help, navigation, and session management.
/help # Show help information
/? # Show help information (alternative)
/quit # Exit the application
/exit # Exit the application (alternative)
/clear # Clear screen and conversation history
/stats # Show session statistics
/stats model # Show model-specific statistics
/stats tools # Show tool usage statistics
/usage # Show session statistics (alias for /stats)
/about # Show application informationUsage Examples:
# Get help
/help
# Show current session stats
/stats
# Clear conversation history
/clearCommands for managing application configuration and user preferences.
/settings # Open settings dialog
/theme # Open theme selection dialog
/auth # Manage authentication
/privacy # Open privacy settings
/vim # Toggle Vim modeUsage Examples:
# Open settings interface
/settings
# Change theme
/theme
# Configure authentication
/auth
# Toggle Vim mode on/off
/vimCommands for managing conversation context, memory, and working directory.
/memory # Show/manage conversation memory
/compress # Compress conversation history
/summarize # Compress conversation history (alias for /compress)
/directory # Change working directory
/directory add <path> # Add directory to workspace context
/directory show # Show current workspace directories
/dir # Change working directory (alias for /directory)
/init # Initialize Gemini context file
/restore # Restore from checkpointUsage Examples:
# View conversation memory
/memory
# Change working directory
/directory
# Initialize GEMINI.md context file
/init
# Compress long conversation
/compressCommands for managing available tools and extensions.
/tools # Show available tools
/extensions # Manage extensions
/mcp # Manage MCP serversUsage Examples:
# List available tools
/tools
# Open extension management
/extensions
# Manage MCP servers
/mcpCommands for development workflow and debugging support.
/bug # Create bug report
/editor # Configure editor settings
/copy # Copy conversation to clipboard
/terminal-setup # Configure terminal integration
/setup-github # Setup GitHub integrationUsage Examples:
# Create bug report
/bug
# Configure default editor
/editor
# Copy conversation for sharing
/copyCommands for saving and managing conversation sessions.
/chat save <name> # Save conversation with name
/chat resume <name> # Resume saved conversation
/chat load <name> # Resume saved conversation (alias for /chat resume)
/chat list # List saved conversations
/chat delete <name> # Delete saved conversationUsage Examples:
# Save current conversation
/chat save project-review
# Resume previous conversation
/chat resume project-review
# List all saved chats
/chat listEaster eggs and utility commands.
/corgi # Toggle corgi mode (easter egg)
/docs # Open documentation
/ide # Configure IDE integrationCommands that display information without modifying state:
/help, /? - Help and usage information/stats - Session statistics and metrics/about - Application version and information/tools - Available tools listing/chat list - Saved conversations listingCommands that change application state or view:
/clear - Clear conversation history/directory - Change working directory/theme - Change visual theme/vim - Toggle Vim editing modeCommands that modify configuration or manage resources:
/settings - Application configuration/auth - Authentication management/extensions - Extension management/mcp - MCP server management/chat save/resume - Conversation managementCommands that integrate with development workflows:
/init - Initialize project context/editor - Editor configuration/setup-github - GitHub integration/terminal-setup - Terminal configurationInteractive commands operate within the context of the current session:
interface SessionContext {
conversationHistory: Message[];
currentDirectory: string;
activeSettings: LoadedSettings;
loadedExtensions: Extension[];
availableTools: string[];
mcpServers: Record<string, MCPServerConfig>;
}Commands can produce different types of responses:
type CommandResponse =
| { type: 'info'; message: string }
| { type: 'dialog'; component: React.ComponentType }
| { type: 'action'; action: () => Promise<void> }
| { type: 'navigation'; target: string };Interactive commands include comprehensive error handling:
interface CommandError {
command: string;
message: string;
suggestions?: string[];
recoverable: boolean;
}Available in all interactive modes:
Ctrl+C # Interrupt current operation
Ctrl+D # Exit application (EOF)
Tab # Auto-complete commands and paths
Up/Down Arrow # Command history navigationWhen Vim mode is enabled (/vim):
Esc # Enter command mode
i # Enter insert mode
:q # Quit (equivalent to /quit)
:w # Save conversationFor settings and configuration dialogs:
Tab # Next field
Shift+Tab # Previous field
Enter # Confirm selection
Esc # Cancel dialogUsers can define custom aliases in settings:
{
"ui": {
"commandAliases": {
"s": "/settings",
"t": "/theme",
"cls": "/clear"
}
}
}Interactive commands maintain persistent history:
interface CommandHistory {
commands: string[];
maxSize: number;
persistent: boolean;
}Commands are saved across sessions and can be accessed via arrow key navigation.
Install with Tessl CLI
npx tessl i tessl/npm-google--gemini-cli