Three useful Gemini CLI shortcuts

I've been using the Gemini CLI a lot lately and found a few keyboard shortcuts that I use all the time.

First, starting your prompt with an exclamation mark (!) enters shell mode. Running shell commands this way makes their output part of the chat context, allowing Gemini CLI to help you immediately diagnose or resolve errors. Press ESC at any time to return to normal prompt mode.

Second, pressing Ctrl + X opens your current prompt in your default system text editor. This is useful when you need more space to draft a message, refine a prompt, or paste long blocks of text before submitting.

Finally, pressing Shift + Tab toggles auto-apply mode. When active, any file edits or code suggestions returned by Gemini CLI are automatically written to your filesystem. This feature modifies files directly, so use it with caution!

Signature