AI Coding CLI Keyboard Shortcuts Compared

Terminal AI coding agents have gone from a curiosity to a daily tool in barely a year. Instead of a chat box in a browser, these run directly in your terminal: you point them at a project, type a request, and they read files, write code, and run commands. The biggest — Claude Code (Anthropic), Gemini CLI (Google), Codex CLI (OpenAI), Grok Build (xAI), Aider, opencode, Cursor CLI, Qwen Code (Alibaba), Kimi Code CLI (Moonshot AI), Kilo CLI, Crush (Charm), and goose — all share a common shape, which means most of what you learn in one carries over to the next.

This guide puts their keyboard shortcuts and slash commands side by side: what is identical, what looks identical but behaves differently, and what is unique to each. For a complete reference, every tool has its own page linked at the bottom.

The shared DNA of terminal AI agents

All twelve are text user interfaces (TUIs) built on the same decades-old terminal conventions, so the fundamentals are remarkably consistent. Across every tool: you submit with Enter, you reach commands by typing /, and the classic readline editing keys (Ctrl + A for start of line, Ctrl + R to search history) mostly work. The differences are smaller than the similarities — but a few of them will trip you up if you switch tools, especially the meaning of Shift + Tab.

Core actions compared

The actions you reach for in every session. Note the two genuine divergences: how you insert a newline without sending, and how you interrupt a running task.

Action Claude Code Gemini CLI Codex CLI Grok Build Aider
Start in current project claude gemini codex grok aider
Submit message Enter Enter Enter Enter Enter
New line (no send) Shift + Enter Ctrl + J Ctrl + J /multiline Alt + Enter
Interrupt running task Ctrl + C Ctrl + C Esc Ctrl + C
Clear the screen Ctrl + L Ctrl + L Ctrl + L
Exit Ctrl + D / /exit Ctrl + D / /quit Ctrl + C / /quit /quit /exit

A dash (—) means the tool does not document a single-key shortcut for that action — use the equivalent slash command, or your terminal's default. On Mac, Aider's new-line is Meta + Enter.

The Shift+Tab trap: modes work differently

This is the single most confusing difference between these tools. Seven of them use Shift + Tab to switch modes — but the modes themselves are different, and the other five do not use the key at all. If you switch tools and muscle-memory Shift + Tab, you will not get what you expect.

Tool Shift + Tab does… Modes available
Claude Code Toggles plan mode on and off Normal ↔ Plan (read-only planning)
Gemini CLI Cycles approval modes Default → Auto-Edit → Plan
Grok Build Cycles session modes Code → Plan → Ask
Codex CLI Nothing — use a command /plan, /permissions
Aider Nothing — use a command /code, /ask, /architect
opencode Cycles agents Build, Plan, + custom agents
Cursor CLI Rotates between modes Agent → Plan → Ask
Qwen Code Cycles approval modes plan → default → auto-edit → auto → yolo
Kimi Code CLI Toggles plan mode on and off Normal ↔ Plan (read-only research)
Kilo CLI Nothing — use a command /agents: Architect, Ask, Debug, Orchestrator
Crush Nothing — changes focus instead Ctrl + Y yolo; rest via the Ctrl + P palette
goose Nothing — use a command /mode: approve, smart_approve, auto, chat

The throughline: every tool has a way to switch between "just plan / answer, don't touch my files" and "go ahead and make changes." Seven of the ten expose it on Shift + Tab — but with three genuinely different meanings. It is a plain on/off toggle in Claude Code and Kimi Code CLI, an approval-mode cycle in Gemini CLI, Grok Build, Cursor CLI, and Qwen Code (which packs the most stops, five), and an agent switcher in opencode. Codex CLI, Aider, Kilo CLI, Crush, and goose don't bind it at all — and note Tab in Crush moves focus between panes, so pressing Shift + Tab out of habit there just walks your focus backwards. goose has the widest set behind a command: /mode takes four values, including a smart_approve that only asks about risky actions and a chat that disables tools entirely.

Slash commands compared

Typing / opens a command menu in every one of them. The vocabulary overlaps heavily, but the exact names drift — especially for compacting context and for project memory files.

What you want Claude Code Gemini CLI Codex CLI Grok Build Aider
Show help /help /help /help /help /help
Switch model /model /model /model /model /model
New / clear conversation /clear /clear /new /new /clear
Compact context to save tokens /compact /compress /compact /compact
Resume a past session /resume /resume /resume /resume /load
Generate a project memory file /init /init /init
Manage long-term memory /memory /memory /memory
Manage MCP servers /mcp /mcp /mcp /mcps
Review code / diff /review /review /diff

Note the memory-file naming: Claude Code writes a CLAUDE.md, Gemini CLI a GEMINI.md, and Codex CLI an AGENTS.md — same idea, three filenames.

Line editing: the readline keys

Because these are terminal apps, they inherit the standard Emacs-style line-editing keys. Claude Code and Gemini CLI document the fullest set; Codex CLI and Aider document a subset and otherwise fall back to your terminal's defaults.

Action Claude Code Gemini CLI Codex CLI Aider
Start of line Ctrl + A Ctrl + A Ctrl + A
End of line Ctrl + E Ctrl + E Ctrl + E
Delete previous word Ctrl + W Ctrl + W
Delete to end of line Ctrl + K Ctrl + K
Search history Ctrl + R Ctrl + R Ctrl + R Ctrl + R
Open in external editor Ctrl + X Ctrl + E Ctrl + G Ctrl + G Ctrl + X Ctrl + E

Referencing files and running shell commands

Two patterns recur: an @ prefix to pull a file into context, and a ! prefix to run a shell command. Claude Code, Gemini CLI, and Codex CLI all use @file; Aider uses an explicit /add command instead.

Action Claude Code Gemini CLI Codex CLI Aider
Add a file to context @path @path @ (fuzzy) /add
Run a shell command !command !command !command /run (alias !)
Add a note to memory #note /memory

What makes each one different

Beyond the shared basics, each tool has a few signature shortcuts worth knowing.

  • Claude Code — the richest inline syntax: @file to reference, !bash to run a command, and #note to drop a line into memory, all without leaving the prompt. Shift + Tab toggles plan mode.
  • Gemini CLI — the most complete documented keymap (it is autogenerated from source). Standouts: Ctrl + Y for YOLO mode (auto-approve everything), Ctrl + T to toggle the TODO list, and a built-in /vim mode.
  • Codex CLI — interrupts with Esc, not Ctrl + C (the one to remember). It also lets you tune reasoning effort live with Shift + Up / Down, and remap keys with /keymap.
  • Grok Build — the most multimedia: /imagine generates an image and /imagine-video a video, right from the agent. /btw asks a side question without derailing the task. xAI publishes no full keybinding table, so its documented keys are limited to Shift + Tab and Enter.
  • Aider — the most git-native: /commit, /undo (reverts Aider's last commit), and /diff are first-class. It also has explicit chat modes (/code, /ask, /architect) and can pull a web page into context with /web.
  • opencode — the only one with a leader key (Ctrl + X by default), so many shortcuts are two-step chords like Ctrl + X then N for a new session. It also ships the richest documented keymap of the group (closer to a real editor) and interrupts the model with Esc — not Ctrl + C, which quits.
  • Cursor CLI — the terminal sibling of the Cursor editor (run it with agent). Its standout is a built-in review flow: press Ctrl + R to review the agent's changes, then arrow through files and press i to add follow-up instructions. It approves commands with y/n and can hand a task to a cloud agent by prefixing the message with &.
  • Qwen Code — Alibaba's Gemini CLI fork, so the keys feel familiar, but it adds the most. Agent Arena (/arena) runs several models on the same task in parallel worktrees and lets you merge the winner; /language localizes the whole UI; and Shift + Tab cycles five approval modes — the widest range here.
  • Kimi Code CLI — Moonshot AI's agent, and the only one you can steer mid-answer: Ctrl + S injects your correction into the turn that's already running, so you redirect it without stopping and re-prompting. Its approval panel also takes number keys 19 for one-keystroke approvals, and it adds /goal for autonomous multi-step objectives and /swarm for parallel sub-agents. Shell mode is ! rather than a key combo.
  • Kilo CLI — a fork of opencode, so it inherits the same Ctrl + X leader-key chords, and it's the most model-agnostic of the group (/models switches provider freely rather than being tied to one vendor). Its distinctive touch is sub-agent session navigationCtrl + X then drops into a child session and the arrow keys walk the tree. Mode switching is /agents, not Shift + Tab.
  • Crush — Charm's agent, and the odd one out in two ways. It's palette-driven, not slash-driven: Ctrl + P opens a searchable command palette instead of a fixed /command catalog. And its chat pane uses vim navigationj/k by line, d/u by half page, g/Shift+G to the ends, y to copy — which nothing else here does. Deleting an attachment is a numeric chord (Ctrl + R then the index). Watch out for Ctrl + J: it inserts a newline in the input box but scrolls down in the chat pane.
  • goose — the smallest keymap of the twelve (four keys) and the only one where the newline key is a setting rather than a binding, via GOOSE_CLI_NEWLINE_KEY. Its Ctrl + C is three-in-one: clear the line, interrupt the request, or exit, depending on context. Where it goes deep is reuse — /recipe turns the conversation you just had into a re-runnable recipe, /skills loads skills, /builtin and /extension add capabilities mid-session, and goose schedule runs one on a timer. It's foundation-governed rather than a single vendor's tool.

Three of these are forks or rebuilds, which is worth knowing before you learn a keymap twice: Qwen Code follows Gemini CLI, and Kilo CLI follows opencode — so if you know the parent, most of the child's keys come free. Crush and opencode are frequently confused with each other because of a shared naming history, but they are separate projects today and their keymaps genuinely differ: opencode routes actions through a Ctrl + X leader key, while Crush binds them directly and puts the rest in its palette.

Which shortcuts should you actually learn?

If you bounce between these tools, four habits cover almost everything: submit with Enter, type / to find any command, search history with Ctrl + R, and check how each tool handles modes before you trust Shift + Tab. The rest you can look up — each tool's full reference is below.