Complete Gemini CLI keyboard shortcuts and commands reference — 25 shortcuts across 3 categories. Quick reference cheat sheet for Windows & Mac.
Gemini CLI runs inside the terminal, so its shortcuts are shaped by terminal conventions — several of them are the readline keys you already use in bash — plus a layer of slash commands for anything that needs an argument. The bindings here are read from the CLI's own shortcuts panel, which opens when you type ? at an empty prompt.
| Shortcut | Action | Description |
|---|---|---|
| Ctrl + C | Cancel / quit | Cancel the current request, or quit the CLI when the input is empty. |
| Ctrl + D | Exit CLI | Exit Gemini CLI when the input buffer is empty. |
| Ctrl + L | Clear screen | Clear the terminal screen and redraw the UI. |
| Ctrl + T | Toggle TODO list | Show or hide the full TODO list the agent is working through. |
| Ctrl + Y | Toggle YOLO mode | Toggle auto-approval (YOLO) mode for tool calls. |
| Shift + Tab | Cycle approval modes | Cycle through approval modes: default, auto-edit, and plan (read-only). |
| Ctrl + G | Open external editor | Open the current prompt or plan in an external editor. |
| F12 | Debug console | Toggle the debug console for detailed error information. |
| Esc Esc | Clear / rewind | Clear the input prompt, or browse and rewind previous interactions when empty. |
| Shortcut | Action | Description |
|---|---|---|
| Enter | Submit prompt | Submit the current prompt to the model. |
| Ctrl + Enter | New line | Insert a newline without submitting (Alt+Enter and Ctrl+J also work). |
| Tab | Queue message | Queue the current prompt to run after the current task finishes. |
| Ctrl + R | Reverse history search | Start reverse search through prompt history, like a shell. |
| Ctrl + P / Ctrl + N | History previous / next | Show the previous or next entry in prompt history. |
| ! | Shell mode | On an empty prompt, enter or exit shell mode to run commands directly. |
| ? | Shortcuts panel | On an empty prompt, toggle the built-in keyboard shortcuts panel. |
| Ctrl + O | Expand paste / output | Expand or collapse paste placeholders and long content blocks. |
| Shortcut | Action | Description |
|---|---|---|
| /help | List commands | Show help and list all available slash commands (alias /?). |
| /chat | Manage sessions | Browse, save, and resume past sessions and conversations. |
| /rewind | Rewind conversation | Rewind the conversation history to a previous turn. |
| /restore | Restore files | Restore files to their state before the last tool call. |
| /model | Switch model | View or change the current model. |
| /settings | Open settings | Open the settings editor from inside the REPL. |
| /vim | Vim mode | Enable vim NORMAL/INSERT editing modes in the input. |
| /auth | Switch auth | Switch to a different auth provider or account. |
Enter submits and Ctrl + Enter adds a newline, the inverse of a chat app, because the terminal treats Enter as the submit key. Ctrl + R reverse-searches your prompt history exactly as it does in a shell, and Ctrl + P / Ctrl + N walk through previous and next prompts. Tab queues a message to be sent after the current response finishes, which is useful when you know the next instruction before the model is done. Ctrl + O expands a collapsed paste or long tool output so you can read what actually went in.
Shift + Tab cycles the approval mode that decides whether the CLI asks before running tools and editing files; Ctrl + Y jumps straight to YOLO mode, where nothing is confirmed. YOLO is fine for a scratch directory and a bad idea in a repository with uncommitted work — the /restore command can roll back file edits from a checkpoint, but only if checkpointing is enabled. Esc Esc — Escape twice — clears the current input or rewinds the conversation depending on context, and /rewind does the same explicitly.
Typing ! at the start of a prompt switches to shell mode so the rest of the line runs as a command, which saves leaving the session for a quick git status. Ctrl + G opens the current prompt in your external editor for longer instructions, and Ctrl + T toggles the TODO list the agent maintains during a multi-step task. Ctrl + C cancels a running response; a second press exits the CLI, as does Ctrl + D at an empty prompt.
Ctrl + Enter inserts a newline. Enter alone submits. For anything long, Ctrl + G opens the prompt in your editor.
It skips all approval prompts, so tools run and files change without confirmation. Shift + Tab cycles back to a safer mode.
Type ? at an empty prompt to open the shortcuts panel, or run /help for slash commands.
Start the line with ! — for example !ls — and it executes in the shell instead of being sent to the model.
Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"