Gemini CLI cheat sheet

84 shortcuts in 14 lessons

Reading a list won't make them stick. ShortcutFoo has you type each shortcut, then brings it back just before you'd forget it.

Essentials I

7 shortcuts
  • ↵
    Submit the prompt
  • ⇧↵
    Insert a newline
  • ESC
    Dismiss a dialog or cancel
  • ^C
    Cancel the request or quit
  • ^D
    Exit when the input is empty
  • ^L
    Clear and redraw the screen
  • !
    Toggle shell mode on an empty prompt

Essentials II

6 shortcuts
  • ?
    Toggle the shortcuts panel
  • ⇧TAB
    Cycle the approval mode
  • ^R
    Search prompt history
  • ^P
    Previous history entry
  • ^G
    Open the prompt in an external editor
  • ESCESC
    Clear input or rewind if empty

Core commands I

7 shortcuts
  • /help
    Show help
  • /clear
    Clear context and start a new session
  • /quit
    Quit the CLI
  • /model
    Manage the model
  • /compress
    Summarize context to save tokens
  • /copy
    Copy the last output
  • /init
    Generate a GEMINI.md file

Core commands II

7 shortcuts
  • /resume
    Browse and resume sessions
  • /rewind
    Rewind the conversation
  • /stats
    Show session statistics
  • /settings
    Open the settings editor
  • /theme
    Change the theme
  • /tools
    List available tools
  • /memory
    Manage GEMINI.md memory

Navigation I

7 shortcuts
  • ^A
    Move to the start of the line
  • ^E
    Move to the end of the line
  • ^F
    Move one character right
  • LEFT
    Move one character left
  • ⌥B
    Move one word left
  • ⌥F
    Move one word right
  • UP
    Move up one line

Navigation II

7 shortcuts
  • DOWN
    Move down one line
  • ⇧UP
    Scroll up
  • ⇧DOWN
    Scroll down
  • ^HOME
    Scroll to the top
  • ^END
    Scroll to the bottom
  • PAGEUP
    Scroll up one page
  • PAGEDOWN
    Scroll down one page

Editing I

5 shortcuts
  • ^K
    Delete to the end of the line
  • ^U
    Delete to the start of the line
  • ⌥BACKSPACE
    Delete the previous word
  • ⌥D
    Delete the next word
  • BACKSPACE
    Delete the character to the left

Editing II

5 shortcuts
  • DEL
    Delete the character to the right
  • ^Z
    Undo
  • ^⇧Z
    Redo
  • ^V
    Paste
  • \
    Insert a newline after a backslash

App controls I

5 shortcuts
  • ^Y
    Toggle YOLO auto-approval
  • ⌥M
    Toggle Markdown rendering
  • ^S
    Toggle mouse mode
  • ^O
    Expand or collapse content
  • F9
    Toggle copy mode

App controls II

5 shortcuts
  • F4
    Show IDE context details
  • TAB
    Queue the prompt for later
  • TABTAB
    Toggle minimal or full UI
  • ^B
    Toggle the background shell
  • ^L
    Toggle the background shell list

Dialogs and completions I

5 shortcuts
  • ↵
    Confirm the selection
  • TAB
    Accept the inline suggestion
  • UP
    Previous completion
  • DOWN
    Next completion
  • k
    Move up in a dialog

Dialogs and completions II

4 shortcuts
  • j
    Move down in a dialog
  • ⇧TAB
    Previous item or question
  • RIGHT
    Expand the inline suggestion
  • LEFT
    Collapse the inline suggestion

More commands I

7 shortcuts
  • /mcp
    Manage MCP servers
  • /extensions
    Manage extensions
  • /skills
    Manage agent skills
  • /agents
    Manage subagents
  • /vim
    Toggle vim mode
  • /plan
    Switch to Plan Mode
  • /restore
    Restore files from a checkpoint

More commands II

7 shortcuts
  • /directory
    Manage workspace directories
  • /auth
    Change the auth method
  • /editor
    Select an editor
  • /docs
    Open the documentation
  • /bug
    File a bug report
  • /about
    Show version info
  • /shells
    Toggle background shells view
Achievement unlocked