Grok Build keyboard shortcuts, slash commands and CLI flags

Keys, slash commands and command-line options of Grok Build, the terminal coding agent from xAI that starts with grok, as printed in its documentation on docs.x.ai. One column serves every system, because these are terminal keys. Single letters in the scrollback need vim mode, and a few chords change with the terminal. The help pages for the Grok chat app on grok.com print no keys, so the chat app has no rows here.

202 shortcuts in 17 sections. Checked row by row against xAI Docs: Grok Build, Keyboard Shortcuts on . Edited by Jay.

Prompt and session control 10

ActionShortcut
Send the promptEnter
Switch prompt and scrollback focusThe scrollback keys act only after focus has moved there.Tab
Cancel the running turnEsc
Clear prompt or rewindWith text typed it empties the prompt; on an empty prompt it brings up the rewind list.EscthenEsc
Cancel the turnCtrl+C
Cycle session modeSteps through Normal, Plan, Auto where that feature is enabled, and Always-approve.Shift+Tab
Open the command paletteThe palette collects the session, context, model and tool actions.Ctrl+Por?
Show keyboard shortcutsCtrl + X is the form for Windows and for terminals lacking the Kitty keyboard protocol; inapplicable entries are dimmed.Ctrl+.orCtrl+X
Open settingsBrings up the modal that the /settings command also opens.F2orCtrl+,
Quit GrokNeeds a second press to confirm; VS Code-family terminals accept only Ctrl + D.Ctrl+QorCtrl+D

Writing the prompt 7

WezTerm passes Ctrl+Enter and Shift+Enter on only with enable_kitty_keyboard = true in its configuration.

ActionShortcut
Interject during a turnWezTerm needs enable_kitty_keyboard = true before it passes Ctrl + Enter on.Ctrl+EnterorCtrl+I
Insert a newlineOnce multiline input is switched on, this key sends the prompt instead.Shift+Enter
Insert a newline (fallback)For terminals that cannot report Shift + Enter, such as those of VS Code, Cursor, Windsurf and Zed.Alt+Enter
Toggle multiline inputApplies while the prompt has focus; elsewhere the same chord opens the model picker.Ctrl+M
Search prompt historyCtrl+R
Enter shell modeWorks only as the first character of a prompt that has nothing in it.!
Start voice dictationOn by default; the voice_keybind_enabled setting under [ui] switches these two keys off.Ctrl+SpaceorF8

Scrollback navigation 12

Single letters such as j, k, g and y act only in vim mode, which /vim-mode or vim_mode = true under [ui] in config.toml turns on; the arrow-key forms work without it.

ActionShortcut
Select next entryjorDown
Select previous entrykorUp
Go to next turnShift+LorShift+Right
Go to previous turnShift+HorShift+Left
Go to next responseShift+J
Go to previous responseShift+K
Go to topA bare letter, so it needs vim mode; Shift + G is the opposite jump.g
Go to bottomShift+G
Scroll half page upCtrl+U
Scroll half page downListed for the scrollback; the same chord pressed twice is also one of the quit keys.Ctrl+D
Scroll one page upPage Up
Scroll one page downPage Down

Scrollback entries and copying 11

ActionShortcut
Collapse the selected entryhorLeft
Expand the selected entrylorRight
Toggle a single entryOpens the entry when it is collapsed and folds it when it is open.e
Toggle every entryApplies the same open-or-fold switch to the whole scrollback at once.Shift+E
Toggle all thinking blocksCtrl+E
Toggle raw markdownr
Copy contenty
Copy command or pathShift+Y
Open block in fullscreen viewerWith the scrollback focused, Enter opens the block instead of sending a prompt.EnterorCtrl+F
Search the scrollbackA vim-mode key; the /find command starts the same search./
Kill selected background taskx

Panels and sessions 11

ActionShortcut
Toggle the todo paneListed for the agent screen; the Agent Dashboard uses the same chord to pin an agent.Ctrl+T
Background the running commandMoves a foreground command out of the way so you need not wait for it.Ctrl+B
Toggle the prompt queueThe panel holds prompts waiting for the current turn to end; /queue prints the same list.Ctrl+;orCtrl+'
Open sessionsCtrl+S
Open extensionsNot in VS Code-family terminals, where this chord interjects; run /plugins there.Ctrl+L
Toggle the tasks paneThe pane lists the background commands, subagents and monitors that are running.Ctrl+G
Toggle always-approveSwitches the mode that skips permission prompts; in Apple Terminal the chord also interjects.Ctrl+O
Start a new sessionHas to be pressed twice before the new session begins.Ctrl+N
Pick a modelOnly while the prompt is not focused; with focus there it toggles multiline input.Ctrl+M
Open the Agent DashboardA full-screen overview of every session; the same chord leads back to it from a session.Ctrl+\
Open New Worktree dialogWorks on the welcome screen; in the Agent Dashboard it switches worktrees for new agents.Ctrl+W

Plan review 5

ActionShortcut
Approve the planStarts the build; comments still pending are sent along with the approval.a
Request changesWrite your notes and press Enter to send them back.s
Comment on a line or rangeThe comment attaches to whatever is selected in the plan preview.c
Quit plan modeLeaves the review screen and switches plan mode off.q
Switch plan preview and promptTab

Agent Dashboard 13

ActionShortcut
Select a rowThe selected row shows a peek panel with that agent's latest activity.UporDown
Open the selected sessionAttaches to the session in a full details view.Enter
Search agentsFilter with a:NAME for one agent or s:STATE for a state; anything else is matched as text.Ctrl+/
Pin or unpin an agentCtrl+T
Rename an agentCtrl+R
Stop or close an agentNeeds a second press before the agent is stopped.Ctrl+X
Reorder pinned agentsShift+UporShift+Down
Close peek, filter or dashboardEach press closes one layer: first the peek panel, next the filter, last the dashboard itself.Esc
Group rows by directoryRows are grouped by state until you switch; the choice is kept in config.toml.Ctrl+G
Return to the dashboardUsed from the details view of a session you opened.Ctrl+\
Cycle between sessionsWorks from the details view of an attached session.Ctrl+[orCtrl+]
Change new agents' directoryAffects the agents you dispatch from the bottom input bar afterwards.Ctrl+L
Toggle worktree for new agentsDecides if agents sent from the input bar get their own git worktree.Ctrl+W

MCP tab of the extensions modal 5

ActionShortcut
Toggle a serverOpened with /mcps; switches the highlighted server on or off.Space
Refresh serversReloads the list once you have changed the configuration.r
Authenticate an OAuth serveri
Add a servera
Remove a serverx

Terminal differences 3

ActionShortcut
Interject (VS Code-family terminals)Replaces Ctrl + Enter in the VS Code, Cursor, Windsurf and Zed terminals.Ctrl+L
Half-page scroll (VS Code family)Does the half-page scroll in the VS Code, Cursor, Windsurf and Zed terminals.Shift+D
Interject (Apple Terminal)An extra interject key there; elsewhere this chord toggles always-approve.Ctrl+O

Slash commands for sessions and context 20

ActionShortcut
Quit the applicationAlso answers to /exit; the keyboard route is Ctrl + Q pressed twice./quit
Browse commands and shortcuts/help
Return to welcome screen/home
Start a new sessionAlias /clear; the new_session_worktree_mode setting decides if it offers a worktree./new
Resume a previous sessionShows a picker with the recent sessions of the workspace you are in./resume
Manage active sessionsSwitch to another active session, give one a new name or close it./sessions
Fork the sessionThe copy becomes a peer agent that starts from the same conversation./fork
Fork into a worktreeGives the fork an isolated checkout so parallel agents cannot overwrite each other./fork --worktree
Rename the sessionAlias /title; the new name goes to the session you are in./rename TITLE
Share session by URL/share
Show session info/session-info
View context usage/context
Compact conversation historyOptional text after the command says what the compacted history should keep./compact
Rewind to an earlier turnOpens the same list of rewind points as Esc pressed twice on an empty prompt./rewind
Export the conversationThe target is either a file or the clipboard./export
Copy the last responseAdd a number N to take the Nth-latest response instead./copy
Search the scrollback/find
View transcript in pagerHands the whole transcript to the program named in $PAGER./transcript
Ask a side questionThe turn that is running carries on while the question is answered./btw QUESTION
List queued promptsShows what is waiting for the current turn to finish./queue

Slash commands for models and modes 6

ActionShortcut
Switch the active modelAlias /m; custom models defined in config.toml are chosen by name the same way./model NAME
Set reasoning effortApplies to the model that is active at the moment./effort
Toggle always-approve modeSkips permission prompts for tool calls, though deny rules and hooks keep working./always-approve
Toggle auto modeA classifier approves safe tools by itself; the command exists only when the feature is enabled./auto
Enter plan modeTakes effect on the next prompt; add a description to start a planning turn at once./plan
View the current planReopens the saved plan preview for review./view-plan

Slash commands for tasks and workflows 12

ActionShortcut
List background workPrints a snapshot of running commands, subagents and scheduled prompts in the scrollback./tasks
Repeat a prompt on a schedulePresent only when the feature is available; the interval may be left out./loop INTERVAL PROMPT
Generate an imageTurns a text description into an image; shown only when the feature is available./imagine PROMPT
Generate a videoWorks like /imagine, with a video as the result./imagine-video PROMPT
Author a new workflowDescribe the job after the command; the result is saved as a .rhai file under .grok/workflows./create-workflow
Launch a saved workflowOptional JSON arguments may follow the name./workflow NAME
Pause a workflow run/workflow pause NAME
Resume a workflow run/workflow resume NAME
Stop a workflow run/workflow stop NAME
Open workflow run dashboardA full-screen list of active and retained runs, not of the saved workflow files./workflows
Run background researchStarts the built-in research workflow on the query./deep-research QUERY
Open the Agent DashboardThe typed counterpart of Ctrl + \ inside the TUI./dashboard

Slash commands for display and settings 15

ActionShortcut
Open the settings modalAlias /config; the keys F2 and Ctrl + , lead to the same place./settings
Switch the color themeAlias /t; a theme name after the command switches to it directly./theme
Toggle denser layout/compact-mode
Toggle multiline inputAlias /ml; Ctrl + M does the same from the prompt./multiline
Toggle vim scrollback keysTurns on the bare-letter keys such as j and k, which act in the scrollback and not in the prompt./vim-mode
Toggle message timestamps/timestamps
Check terminal and clipboardReports the detected terminal, the active clipboard routes and fixes for any problems found./terminal-setup
Start voice dictationKeeps working when the two dictation keys are switched off in the settings./voice
Send session feedbackText typed after the command goes along as the message./feedback
View release notesCovers the version you are running; /changelog is an alias./release-notes
View credit usageAlso the place to manage billing./usage
Show privacy statusDisplays the data-retention state and lets you switch it./privacy
Sign in/login
Sign out of the account/logout
Import Claude settings/import-claude

Slash commands for extensions, agents and memory 11

Every user-invocable skill is a slash command too; when two names collide, write the qualified form, for example /local:commit.

ActionShortcut
Open the Plugins tabAll five extension commands lead to one modal; each preselects its own tab./plugins
Open the Hooks tab/hooks
Open the Marketplace tab/marketplace
Open the Skills tab/skills
Open the MCP tabFrom this tab servers are toggled, refreshed, authenticated, added and removed./mcps
Manage agent definitionsAlso reachable under its shorter alias, /agents./config-agents
Manage personas/personas
Save a memory note/remember NOTE
Browse and manage memoriesAlias /mem; listed only while cross-session memory is enabled./memory
Write memory to disk nowPresent only when cross-session memory is switched on./flush
Run memory consolidationOne of three shell-provided commands that need cross-session memory./dream

Installing and starting 15

ActionShortcut
Install on macOS or LinuxThe installer the overview gives for Mac and Linux shells.curl -fsSL https://x.ai/cli/install.sh | bash
Install with PowerShellThe PowerShell alternative the overview prints next to the shell installer.irm https://x.ai/cli/install.ps1 | iex
Open the interactive TUIRun it from the project folder; the first start sends you to a browser to sign in.grok
Run one prompt headlesslyNo TUI opens, which suits scripts and bots.grok -p PROMPT
Sign inAdd --device-auth for device-code sign-in on headless or remote machines.grok login
Sign outRemoves the cached credentials as well.grok logout
Check for updatesOptions --check, --version, --alpha and --stable choose what is looked up or installed.grok update
Print version informationgrok version
Generate shell completionsgrok completions SHELL
Install managed configurationgrok setup
Show discovered configurationReports which rules, skills, hooks, plugins and MCP servers Grok found here; --json prints JSON.grok inspect
List available modelsgrok models
Open the Agent DashboardStarts straight in the dashboard from the shell.grok dashboard
Start ACP agent modeTalks over stdin and stdout, for IDE or tool integration.grok agent stdio
Forward clipboard through a PTYFor copies over SSH or from containers: the wrapper passes OSC 52 writes to your clipboard.grok wrap COMMAND

Flags for the grok command 28

Where they overlap, Claude Code flag names work as aliases: --allowedTools, --disallowedTools, --append-system-prompt, --system-prompt and --dangerously-skip-permissions.

ActionShortcut
Send one promptShort form -p, the spelling the examples use; this is what makes a run headless.--single PROMPT
Choose the output formatValues are plain, json and streaming-json.--output-format FMT
Run inlineKeeps Grok from taking over the terminal with the full-screen TUI.--no-alt-screen
Skip update checksMeant for scripts, CI and other automated runs.--no-auto-update
Set the working directory--cwd PATH
Resume a sessionShort form -r; without an ID it picks the most recent session.--resume ID
Continue the latest sessionShort form -c; picks the newest session of the directory you are in.--continue
Name a new sessionShort form -s; gives a new session the UUID you supply.--session-id UUID
Fork when resumingThe resumed conversation continues under a fresh session ID.--fork-session
Start in a git worktreeShort form -w; the name is optional.--worktree NAME
Base the worktree on a refTakes a branch, a tag or a commit.--ref REF
Choose the modelShort form -m; takes a model ID.--model MODEL
Set reasoning effort--effort LEVEL
Approve all tool callsStarts the session in always-approve mode; --yolo is an alias.--always-approve
Add an allow ruleTakes the same patterns as the permission rules in config.toml.--allow RULE
Add a deny ruleFor this invocation only; a deny always wins over an allow.--deny RULE
Pick a sandbox profile--sandbox PROFILE
Append extra rulesThe text is added at the end of the system prompt.--rules TEXT
Replace the system prompt--system-prompt-override TEXT
Allow built-in tools--tools LIST
Remove built-in tools--disallowed-tools LIST
Limit agent turns--max-turns N
Disable plan mode--no-plan
Disable subagents--no-subagents
Disable memory--no-memory
Disable web search--disable-web-search
Enable cross-session memory--experimental-memory
Use OAuth sign-inApplies when the welcome screen begins authentication.--oauth

Session, worktree and MCP subcommands 18

ActionShortcut
List recent sessionsLimited to sessions of the directory you run it in.grok sessions list
Search sessionsLooks through session titles and prompts.grok sessions search QUERY
Delete a sessionThere is no undo: the session is removed for good.grok sessions delete ID
Export a session transcriptWrites Markdown; a file name may follow the ID, and --clipboard copies instead.grok export ID
Import Claude Code sessionsgrok import
Clear memory filesOptions --workspace, --global and --all choose which memory files go.grok memory clear
List tracked worktreesgrok worktree list
Show one worktreegrok worktree show ID
Remove worktreesAdd --dry-run to preview what would go.grok worktree rm IDS
Clean up stale worktreesDrops entries whose folder no longer exists; with --max-age it removes idle worktrees past that age too.grok worktree gc
Add a local stdio serverSERVER is the name you give it; the words after the double dash start the server.grok mcp add SERVER -- COMMAND
Add a remote HTTP serverFollow it with a server name and its address; OAuth is taken care of.grok mcp add --transport http
Add a project-scoped serverThe definition lands in the repository instead of the user configuration.grok mcp add --scope project
List configured serversgrok mcp list
Remove a servergrok mcp remove NAME
Diagnose MCP serversChecks configuration and connectivity; a server name narrows it down.grok mcp doctor
Manage pluginsTakes list, install or uninstall, update, enable or disable, details and validate as subcommands.grok plugin
Manage marketplace sourcesSubcommands: list, add, remove and update.grok plugin marketplace

Notes

Which Grok this covers

The table is for Grok Build, the coding agent that runs in a terminal as the grok command, because that is the Grok product with a published key reference. The help pages for the chat app at grok.com deal with billing, accounts, Imagine and file uploads and name no keyboard shortcuts, which is why the chat app has no rows.

The keys

Enter sends and Shift + Enter adds a line; in the VS Code, Cursor, Windsurf and Zed terminals, which cannot tell the two apart, the newline is Alt + Enter. Ctrl + P opens the command palette, and Ctrl + . lists the shortcuts inside the app with the entries that do not apply dimmed; on Windows and in terminals without the Kitty keyboard protocol that list is Ctrl + X. Tab moves focus to the scrollback, where the arrow keys always work and the single-letter keys wait for /vim-mode. Quitting and starting a new session both take two presses.

The modes

Shift + Tab cycles Normal, Plan, Auto where it is enabled, and Always-approve. In plan mode the agent may edit only the session plan file until you approve: /plan enters it, and on the review screen a approves and q quits. Always-approve skips the permission prompts for tool calls while deny rules and hooks still apply; Ctrl + O or /always-approve toggles it, and the --always-approve flag starts a session in it. Plan review is not skipped in either automatic mode.

Sources and checks

5 more source pages

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

7 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.