Gemini CLI Keyboard Shortcuts

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.

Session & App Controls (9)

ShortcutActionDescription
Ctrl + CCancel / quitCancel the current request, or quit the CLI when the input is empty.
Ctrl + DExit CLIExit Gemini CLI when the input buffer is empty.
Ctrl + LClear screenClear the terminal screen and redraw the UI.
Ctrl + TToggle TODO listShow or hide the full TODO list the agent is working through.
Ctrl + YToggle YOLO modeToggle auto-approval (YOLO) mode for tool calls.
Shift + TabCycle approval modesCycle through approval modes: default, auto-edit, and plan (read-only).
Ctrl + GOpen external editorOpen the current prompt or plan in an external editor.
F12Debug consoleToggle the debug console for detailed error information.
Esc EscClear / rewindClear the input prompt, or browse and rewind previous interactions when empty.

Input & History (8)

ShortcutActionDescription
EnterSubmit promptSubmit the current prompt to the model.
Ctrl + EnterNew lineInsert a newline without submitting (Alt+Enter and Ctrl+J also work).
TabQueue messageQueue the current prompt to run after the current task finishes.
Ctrl + RReverse history searchStart reverse search through prompt history, like a shell.
Ctrl + P / Ctrl + NHistory previous / nextShow the previous or next entry in prompt history.
!Shell modeOn an empty prompt, enter or exit shell mode to run commands directly.
?Shortcuts panelOn an empty prompt, toggle the built-in keyboard shortcuts panel.
Ctrl + OExpand paste / outputExpand or collapse paste placeholders and long content blocks.

Slash Commands (8)

ShortcutActionDescription
/helpList commandsShow help and list all available slash commands (alias /?).
/chatManage sessionsBrowse, save, and resume past sessions and conversations.
/rewindRewind conversationRewind the conversation history to a previous turn.
/restoreRestore filesRestore files to their state before the last tool call.
/modelSwitch modelView or change the current model.
/settingsOpen settingsOpen the settings editor from inside the REPL.
/vimVim modeEnable vim NORMAL/INSERT editing modes in the input.
/authSwitch authSwitch to a different auth provider or account.
📜 Source: Gemini CLI documentation — Keyboard shortcuts (GitHub). Bindings from the CLI's documented shortcut list and its in-app ? panel, which reflects the installed version. Checked 2026-09-04. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

Gemini Claude Code OpenAI Codex CLI Aider Warp Terminal Ghostty

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

Prompting and history

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.

Approval modes and YOLO

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.

Shell mode and the editor

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.

Frequently asked questions

How do I write a multi-line prompt?

Ctrl + Enter inserts a newline. Enter alone submits. For anything long, Ctrl + G opens the prompt in your editor.

What does YOLO mode do?

It skips all approval prompts, so tools run and files change without confirmation. Shift + Tab cycles back to a safer mode.

Where is the built-in list of shortcuts?

Type ? at an empty prompt to open the shortcuts panel, or run /help for slash commands.

How do I run a shell command without leaving the session?

Start the line with ! — for example !ls — and it executes in the shell instead of being sent to the model.

🤖 Ask AI about Gemini CLI shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok