UniSite Documentation Center

Automated Markdown Deployment Matrix Calculating...

Gemini CLI Technical Reference Guide

Commands, Keyboard Shortcuts, and Startup Configurations

Table of Contents


Slash Commands

Slash commands are the primary way to interact with CLI metadata, session state, and global configuration.

Command Category Description
/help (or /?) General Display help for all available commands and usage.
/about General Show version and system environment info.
/quit (or /exit) General Exit the CLI. Use --delete to wipe session history.
/chat | /resume Session Browse auto-saved sessions or manage tagged checkpoints.
/clear UI Clear the terminal screen and visible history.
/copy Utility Copy the last model output to the system clipboard.
/rewind History Navigate backward through interactions (Shortcut: Esc twice).
/restore Recovery Undo file changes made by the last tool execution.
/settings Config Open the interactive settings editor.
/theme UI Open the dialog to change visual themes.
/vim Input Toggle Vim navigation/editing mode for the input prompt.
/model Config Manage models or set a specific model (set <name>).
/plan Mode Switch to Plan Mode or copy the current plan.
/memory Context Manage hierarchical instructions (add, list, refresh).
/mcp Tools Manage Model Context Protocol servers.
/agents Tools Manage local/remote subagents.
/skills Tools Manage specialized agent workflows.
/extensions Extensibility Manage CLI extensions (install, uninstall, list).
/directory Workspace Manage multi-directory workspace support.
/docs General Open official documentation in the web browser.
/bug Support File a GitHub issue directly from the CLI.

Context & Passthrough Commands

These commands allow you to inject local context or interact directly with your system shell.


Interactive Keyboard Shortcuts

Basic Controls

Key Action
Enter Submit prompt or confirm a dialog selection.
Ctrl+C Cancel request; clear prompt; quit if empty.
Ctrl+D Exit CLI (if input buffer is empty).
Esc Cancel focus, dismiss dialogs, or clear current completion.
Ctrl+L Clear terminal and redraw UI.

Prompt Navigation & Editing

Key Action
Ctrl+A / Home Move cursor to start of line.
Ctrl+E / End Move cursor to end of line.
Ctrl+K Delete from cursor to end of line.
Ctrl+U Delete from cursor to start of line.
Ctrl+W Delete previous word.
Ctrl+Z / Alt+Z Undo last text edit.
Ctrl+Shift+Z Redo last undone edit.
Ctrl+P / N Navigate through prompt history (Previous/Next).
Ctrl+R Start reverse search through prompt history.
Ctrl+Enter Insert a newline without submitting.

UI & Special Interactions

Key Action
Tab Focus Switch: Move focus to active shell. UI: Toggle Minimal/Full UI.
Shift+Tab Move focus back to Gemini; cycle Approval Modes.
? (on empty prompt) Toggle the shortcuts hint panel.
Esc, Esc Clear prompt or open the Rewind browser if empty.
F12 Toggle debug console (error details).
Alt+M Toggle Markdown rendering.
Ctrl+Y Toggle YOLO mode (auto-approve all tool calls).
Ctrl+O Expand/collapse pasted text placeholders inline.
Ctrl+G Open the current prompt or plan in an external editor.

Interactive Menus & Dialogs

Several commands trigger interactive UI elements:


CLI Startup Flags

These flags are used when launching gemini from your terminal.

Flag Description
-m, --model <name> Specify the model to use (e.g., gemini-3-flash-preview).
-p, --prompt <text> Non-interactive query mode.
-i, --prompt-interactive Execute an initial prompt and stay in interactive mode.
-r, --resume <id> Resume a session by index, UUID, or latest.
-s, --sandbox Enable Docker/Seatbelt sandboxing for tool execution.
--approval-mode <mode> Set tool safety level: default, auto_edit, yolo, or plan.
-o, --output-format Set to text, json, or stream-json.
-e, --extensions List specific extensions to load (or none).

Advanced Workflows & Pro-Tips

1. Mastering Plan Mode

Plan Mode is a read-only environment for complex architectural design.

2. Memory Tier Management

The CLI uses a tiered system to balance shared standards with private notes.

3. Context & Quota Efficiency

To minimize token usage and preserve your credit/quota:

4. Subagent Specialization


Gemini CLI Technical Documentation | System Reference | 2026