Skip to main content

Reference · Reference

Grok Build (grok) Cheat Sheet

Search and one-click copy every Grok Build (grok CLI) command by category. Covers CLI commands, flags, slash commands, keyboard shortcuts, configuration, and workflows.

Last updated:

Version: Grok Build 1.0.16 (xAI's official grok CLI) | Updated September 2026

How to use

Expand how to use
  1. 1

    Search commands

    Type a keyword to filter across command names, flags, descriptions, and examples at once.

  2. 2

    Filter by category

    Switch between CLI commands, flags, slash commands, keyboard shortcuts, config, and workflows to reach what you need fast.

  3. 3

    One-click copy

    Use the copy button to copy a command to your clipboard and paste it straight into your terminal or Grok Build session.

Latest updates

Recent notable updates to Grok Build. See the full history at the bottom of the page.

1.0.16 (September 1, 2026)

  • Enterprise policies can now restrict which models users may select by pinning models.allowed_models in a signed requirements.toml (noted in the description of the [models] config entry; the item count stays at 250)
  • MCP servers can now be supplied at session bind time for workspace integrations (an SDK/ACP-level capability with no config key or flag in the official user guide, so it is not carried as an entry on this page)
  • Long-running subagent and task output waits now default to a one-hour ceiling instead of ten minutes

1.0.15 (August 31, 2026)

  • A tip now appears after repeated scrollback drag-copies, suggesting the /copy and /export commands
  • Session close is now faster because memory consolidation runs at the next launch instead of blocking exit
  • Typed input including Enter during pager startup is now preserved and correctly interpreted as submit or newline
See full update history

CLI Commands

grok

Launch the interactive full-screen TUI in the current directory. On first launch, opens a browser to authenticate with grok.com.

Examples

grok
Start a new interactive session

grok "<prompt>"

Launch the interactive TUI and submit an initial prompt as the first turn.

Examples

grok "fix the failing auth test and run it"
Start the TUI with an initial task

grok update

Check for and install the latest version of the Grok Build CLI.

Notes

  • --check: only check for updates
  • --version V: install a specific version
  • --alpha / --stable: choose the update channel

grok version

Print the installed Grok Build (grok CLI) version.

Notes

  • Alias: grok --version

grok login

Start (or restart) the sign-in flow, replacing the cached session in ~/.grok/auth.json. Defaults to SpaceXAI OAuth at auth.x.ai.

Notes

  • --oauth: sign in via browser OAuth (default, flag optional)
  • --device-auth (alias --device-code): device-code flow for headless/remote environments

grok logout

Sign out and clear cached credentials. Takes no flags.

grok models

List all available models, both built-in (SpaceXAI-hosted) and custom (user-configured in config.toml).

grok inspect

Show every skill, plugin, MCP server, hook, and project instruction file (AGENTS.md etc.) that Grok discovers for the current project, with source and approximate token cost.

Notes

  • --json: machine-readable report

grok doctor

Diagnose the terminal, multiplexer, color support, keyboard and clipboard behavior, and microphone (on builds with audio capture), showing detected issues and how to resolve them. Uses the same diagnostic logic as /doctor in the TUI.

Notes

  • --json: print the diagnostic report as machine-readable JSON
  • fix [<id>] [--yes]: list available automatic fixes, or apply one by ID (--yes skips confirmation)

Examples

grok doctor
Show a diagnostic report for the current shell environment
grok doctor fix
List available automatic fixes

grok mcp list

List configured MCP servers from both user (~/.grok/config.toml) and project (.grok/config.toml) scope; project-scoped servers are marked '(project)'.

Notes

  • --json: machine-readable output

grok mcp add

Add an MCP server without editing config files. For stdio servers, everything after -- is the server launch command.

Notes

  • --transport <stdio|http|sse>: transport type, defaults to stdio
  • -e KEY=value: environment variable, repeatable
  • --scope <user|project>: write to ~/.grok/config.toml or .grok/config.toml

Examples

grok mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir
Add a local stdio MCP server
grok mcp add --transport http sentry https://mcp.sentry.dev/mcp
Add a remote HTTP MCP server

grok mcp remove <name>

Remove a configured MCP server by name. Exits 1 if not found, or if defined in both user and project scope (then --scope is required).

Notes

  • --scope <user|project>

grok mcp doctor [<name>]

Diagnose an MCP server's configuration and connectivity. Checks every configured server if no name is given.

Notes

  • --json: machine-readable output

grok mcp enable <name>

Enable a disabled MCP server by name. The personal on/off state is persisted to your user ~/.grok/config.toml (disabled_mcp_servers, plus the entry's enabled key when one exists). It is idempotent, and an unknown name exits 1.

Notes

  • Known names: user/project Grok TOML, names already on the disabled list, compat sources (.mcp.json, Claude, Cursor), plugin MCP servers, and legacy managed grok_com_* servers (no local entry required)
  • Enable only: if the cwd-nearest project definition has a sticky enabled = false, that single key is cleared with comments preserved (disable never rewrites project configs)
  • Not full /mcps parity: gateway connectors (managed_gateway:…, stored under disabled_mcp_tools.__managed_gateway_connectors) stay Space-only in the TUI

Examples

grok mcp enable github
Enable a local/TOML (or compat-sourced) MCP server

grok mcp disable <name>

Disable a configured MCP server by name. The state is recorded in your user ~/.grok/config.toml under disabled_mcp_servers, and project configs are never rewritten. It is idempotent, and an unknown name exits 1.

Notes

  • Known names: user/project Grok TOML, compat sources (.mcp.json, Claude, Cursor), plugin MCP servers, and legacy managed grok_com_* servers (the same discovery as grok mcp doctor and /mcps)
  • grok mcp list marks disabled servers with (disabled)
  • Use grok mcp remove to delete the server definition itself

Examples

grok mcp disable github
Temporarily disable an MCP server while keeping its config

grok plugin list

List installed plugins.

Notes

  • --json
  • --available (requires --json): also list plugins available but not installed

grok plugin install <source>

Install a plugin from a GitHub shorthand, git URL, or local path. Requires --trust to actually activate its hooks, MCP servers, and skills.

Notes

  • Source forms: user/repo, user/repo@v1.0, user/repo#subdir, git URL, SSH URL, local path

Examples

grok plugin install my-org/team-plugins --trust
Install and trust a plugin from GitHub

grok plugin uninstall <name>

Uninstall a plugin. Aliases: rm, remove.

Notes

  • --confirm
  • --keep-data: preserve the plugin's data directory

grok plugin update [<name>]

Update one plugin, or all installed plugins when the name is omitted.

grok plugin enable <name>

Re-enable an installed plugin that was disabled.

grok plugin disable <name>

Temporarily disable an installed plugin without uninstalling it.

grok plugin details <name>

Show the plugin's component inventory (skills, hooks, MCP servers, and other contents).

grok plugin validate [<path>]

Validate a plugin's plugin.json. Defaults to the current directory when the path is omitted.

grok plugin tag [<path>] [--push]

Create a release tag from the version in plugin.json. Omit the path to use the current directory. Pair it with grok plugin validate before publishing.

Notes

  • --push: push the created tag to the remote

Examples

grok plugin tag
Tag the release using the version in plugin.json
grok plugin tag --push
Create the tag and push it to the remote

grok sessions list

List recent sessions for the current working directory, grouped by worktree label (ID, dates, status, summary).

Notes

  • --limit <N>: default 20

grok sessions search <keyword>

Search sessions by keyword, matching titles and prompts (local SQLite index plus remote results).

grok sessions delete <id>

Delete a saved session.

grok export <session-id> [output]

Export a session transcript as Markdown.

grok import [targets...]

Import sessions from Claude Code.

grok worktree <list|show|rm|gc|db>

Manage git worktrees created for sessions.

Notes

  • list: list worktrees
  • show: show worktree details
  • rm [--dry-run] [PATH]: remove a worktree (--dry-run only names the path it would remove)
  • gc [--max-age DURATION] [--dry-run]: clean up tracked worktrees older than the given age (without --max-age it expires nothing; untracked worktrees are never visited). Before removing an expired worktree it checks for uncommitted, untracked or ignored files, a commit no surviving ref holds, or state kept only in that worktree's git directory, and keeps the worktree when it finds any (--force does not skip this check, and grok worktree rm does not apply it)
  • db rebuild: rebuild the worktree registry when it is corrupt
  • gc also runs on a timer beside your session and judges only as many worktrees as it can in about a minute; anything it did not reach is counted as Not judged this pass, so run it again until that number is zero. A commit that only a worktree's own reflog names is given a lasting name under refs/grok/reclaimed/<worktree>/<commit>; recover it with git log refs/grok/reclaimed/ and git branch <name> <commit> (names that are reachable again or older than 30 days are dropped each pass as names_collected)

Examples

grok worktree list
List session worktrees
grok worktree gc
Clean up worktrees that are no longer needed

grok memory clear

Clear memory files (MEMORY.md, sessions/, index.sqlite).

Notes

  • --workspace: clear workspace memory (default)
  • --global: clear the global MEMORY.md
  • --all / --yes

grok dashboard

Launch the TUI directly into the Agent Dashboard, a centralized overview of every top-level session (local sessions and forks) grouped by state, with peek/attach/dispatch.

grok agent stdio

Run Grok as an ACP (Agent Client Protocol) server, exchanging JSON-RPC messages over stdin/stdout. Primary integration mode for IDE/editor extensions (Zed, Neovim, Emacs).

Notes

  • --agent-profile <PATH>: load an agent profile from a file (place it after agent and before the mode name)
  • --reauth: authenticate before the agent starts (place it after agent and before the mode name)

Examples

grok agent stdio
Start an ACP stdio server

grok wrap <command...>

Run a command in a local PTY that intercepts OSC 52 clipboard writes (including tmux-wrapped ones) and forwards them to your local clipboard. Use it when copies cannot reach you over SSH or from containers. It also resets terminal modes if the wrapped command dies uncleanly.

Examples

grok wrap ssh user@host
Forward copies from the SSH host to your local clipboard

grok completions <shell>

Generate shell completion scripts.

Examples

grok completions zsh
Generate the completion script for zsh

grok setup

Fetch and install managed configuration distributed by your organization.

grok du

Report what the grok home (~/.grok) uses on disk. Lists each top-level directory largest first, then each worktree with its size, type, age, label, and path. Worktrees the registry does not track appear as untracked. Alias: grok disk-usage. Worktree clones share storage with their source, so the total can exceed real disk use.

Notes

  • --json: emit the same report as machine-readable output (includes fields such as volume_capacity_bytes, registry, and created_at)

Examples

grok du
Show grok home disk usage and the worktree list
grok du --json
Emit the disk usage report as JSON

grok clone <url> [dir]

Fetch a Git repository into a Grove content store and mount a projected working tree (NFS on macOS, FUSE on Linux). Available only when Grove config (~/.config/grove/config.toml) sets [clone] enabled = true. The default is a depth-1 bootstrap of the selected branch (blob:none + --depth=1), and only that branch is advertised as a remote-tracking ref.

Notes

  • --branch NAME — choose the branch to fetch
  • --cone PATH — limit the checkout to the given cone-mode sparse paths (repeatable)
  • --full-history — fetch the complete commit history, tags and every remote branch (the default before 1.0.9)
  • After a depth-1 clone, git fetch --deepen=N origin and git fetch --unshallow origin deepen only the selected branch. Fetching another branch needs a depth-limited refspec such as git fetch --depth=1 origin refs/heads/NAME:refs/remotes/origin/NAME; an ordinary git fetch origin will not pull its history
  • A default shallow clone requires a Grove daemon that understands the clone_shallow RPC. If the client refuses, restart or update the daemon, or pass --full-history (added in 1.0.9)

Examples

grok clone https://github.com/example/repo
Fetch the repository depth-1 and mount the working tree
grok clone https://github.com/example/repo --full-history
Fetch with complete history, tags and every branch

grok usage <session-id> [turn]

Print the token and cost usage persisted for a session as JSON — the supported alternative to reading session files directly. Omit the turn number to get session totals plus every recorded turn; pass one to get just that turn in the same envelope. Session totals cover the whole conversation, including history inherited by resume or fork. This is separate from /usage in the TUI, which stays on interactive credit and billing.

Notes

  • Output is JSON with the fields sessionId, updatedAt, session and turns (documented in 1.0.13)
  • costUsdTicks is 10^10 ticks per USD — divide by 1e10 for dollars
  • A missing turn number is an error

Examples

grok usage <session-id>
Show session totals plus every recorded turn
grok usage <session-id> 3
Show only the third turn in the same envelope

CLI Flags

-p, --single <PROMPT>

Trigger headless (non-interactive) mode: send one prompt, run tools, print the result, and exit.

Examples

grok -p "Explain this codebase"
Run a headless one-shot prompt

-m, --model <MODEL>

Select the model to use for the session, e.g. grok-build.

-s, --session-id <ID>

Create a new session with a client-chosen UUID. Errors if the value isn't a valid UUID or a session with that ID already exists. Does not resume.

-r, --resume <ID_OR_TITLE>

Resume an existing session by ID or by title. A value that is not an ID is matched against session titles for the current directory, ignoring letter case. Errors if the session does not exist.

Notes

  • If several sessions share a title, a single manually renamed match wins; otherwise the command errors and lists the matching IDs
  • UUID-shaped values are always treated as session IDs and never as titles, so scripts should pass IDs
  • Run it without a value to resume the most recent session for the current directory

-c, --continue

Continue the most recent session in the current working directory.

--fork-session

When resuming, fork into a new session ID instead of continuing the original session.

--cwd <PATH>

Set the working directory Grok operates in.

--output-format <FMT>

Headless output format.

Notes

  • Values: plain (default, human-readable), json (single object with text/stopReason/sessionId/usage/cost), streaming-json (newline-delimited JSON, one type-tagged event per line: text, thought, tool_call, tool_call_update, usage, plan, available_commands, end, error; end is always last, and the list is non-exhaustive so switch on type), streaming-messages-json (newline-delimited JSON in the Messages API stream-json wire format, made up of system/init, assistant, user and result lines; message bodies, usage, tool_use/tool_result, inline web search and stop_reason match the Messages shape, while the system/init and result lines omit placeholder fields they have no real data for and may therefore fail strict schema validation, so use streaming-json when a clean xAI-native stream with no placeholder shape is needed)

Examples

grok -p "Explain this codebase" --output-format json | jq -r '.text'
Parse JSON headless output

--always-approve, --yolo

Auto-approve all tool executions (always-approve / bypassPermissions mode). Explicit deny rules and PreToolUse hooks still apply.

Notes

  • --yolo is an alias of --always-approve

--rules <TEXT>

Custom rules appended to the system prompt for this session, wrapped in a human_rules block.

Notes

  • Alias: --append-system-prompt

Examples

grok --rules "Always use TypeScript. Prefer functional components."
Add per-session rules

--system-prompt-override

Replace the entire system prompt with the given text verbatim, skipping both the default prompt and --rules.

Notes

  • Alias: --system-prompt

--tools <TOOLS>

Headless only. Allowlist of built-in tools (comma-separated internal tool IDs, e.g. run_terminal_cmd). MCP meta-tools remain available unless denied.

Examples

grok -p "Explain this codebase" --tools "read_file,grep,list_dir"
Restrict to read-only tools

--disallowed-tools <TOOLS>

Headless only. Denylist of built-in tools to remove. Supports Agent / Agent(type) entries to block subagent spawning. Wins over --tools when both are set.

Examples

grok -p "Fix this bug" --disallowed-tools "Agent"
Prevent any subagent spawning

--max-turns <N>

Headless only. Maximum number of agentic turns before stopping.

--reasoning-effort, --effort <LEVEL>

Reasoning effort for reasoning models. Works in both TUI and headless mode.

Notes

  • Canonical levels: none, minimal, low, medium, high, xhigh, max (alias of xhigh)

--permission-mode <MODE>

Sets the permission mode for the session.

Notes

  • Only bypassPermissions and default take effect via this flag; other values must be set via defaultMode in config

--allow <RULE>

Permission allow rule using ToolPrefix(glob_pattern) syntax, e.g. Bash(git *). Repeatable.

Examples

grok -p "Set up the project" --allow "Bash(npm*)"
Allow npm-prefixed commands

--deny <RULE>

Permission deny rule using ToolPrefix(glob_pattern) syntax. Repeatable; deny always wins over allow.

Examples

grok -p "Clean up this project" --deny "Bash(rm*)"
Block rm-prefixed commands

--sandbox <PROFILE>

OS-level sandbox profile for filesystem/network access.

Notes

  • Built-in: off (default), workspace, devbox, read-only, strict; or a custom profile name from sandbox.toml

Examples

grok --sandbox workspace
Read everywhere, write only to CWD + ~/.grok/ + temp dirs

--no-plan

Disable plan mode for this session.

--no-subagents

Disable subagent spawning for this session.

--disable-web-search

Disable the web_search and web_fetch tools.

-w, --worktree [NAME]

Start the session in a new git worktree.

Notes

  • Use --worktree=<name> (with '=') when also passing an initial prompt, so the prompt text isn't swallowed as the worktree name

Examples

grok --worktree=feat "refactor module X"
New worktree named 'feat' with an initial prompt

--ref <REF>

Branch, tag, or commit to base the new worktree on (used with -w/--worktree).

--json-schema

Headless-mode flag that constrains the model's output to a supplied JSON Schema.

--oauth

Use OAuth when the welcome screen starts authentication.

--leader, --no-leader

An agent option shared by every grok agent transport (stdio / serve / headless). --leader connects to a shared leader process, while --no-leader forces a local-only agent process instead.

Notes

  • Place it after agent and before the mode name
  • --leader: connect to a shared leader process
  • --no-leader: force a local agent process

Examples

grok agent --no-leader stdio
Start the stdio transport with a local agent process instead of a shared leader

--prompt-file <PATH>

Read the headless prompt from a file instead of a command-line argument. Useful for long prompts or when you want to avoid shell escaping.

Examples

grok -p --prompt-file ./task.md
Run with the contents of task.md as the prompt

--prompt-json <JSON>

Pass the prompt as an array of JSON content blocks. Use it when you need structured input, such as mixing text and images.

Examples

grok -p --prompt-json '[{"type":"text","text":"Review this diff"}]'
Pass the prompt as content blocks

--verbatim

Send the prompt exactly as given, with no preprocessing. Use it when you want to avoid template expansion or reformatting.

Examples

grok -p "$RAW" --verbatim
Send the input as the prompt without changes

--include-partial-messages

Include raw stream_event deltas in the streaming output. It only applies to --output-format streaming-messages-json and is ignored with a warning otherwise.

Examples

grok -p "..." --output-format streaming-messages-json --include-partial-messages
Stream output including the raw events

--agent <NAME>

Select the agent by name or by the path to a definition file. The GROK_AGENT environment variable does the same thing.

Examples

grok -p "..." --agent reviewer
Run with the reviewer agent

--agents <JSON>

Pass subagent definitions inline as JSON. This is a headless-only flag; in the interactive TUI it prints a warning and is ignored.

Examples

grok -p "..." --agents '{"reviewer":{"model":"grok-build"}}'
Pass subagent definitions inline

--ref, --worktree-ref <REF>

Choose the branch, tag, or commit that the git worktree created by --worktree is based on. --ref is an alias for the same thing.

Notes

  • Alias: --ref

Examples

grok --worktree feature --worktree-ref main
Start in a worktree based on main

--no-alt-screen

Run inline without the alternate screen. Use it when you want to keep the scrollback, or on terminals that do not support the alternate screen.

Examples

grok --no-alt-screen
Start with inline rendering

--minimal

Start in minimal mode. It applies to the session only and does not write config.toml. Minimal mode renders with a fixed terminal-native palette and ignores the theme settings.

Examples

grok --minimal
Start in minimal mode

--fullscreen

Start in fullscreen mode. It applies to the session only and does not write config.toml. To change the default startup mode, use Default screen mode in /settings.

Examples

grok --fullscreen
Start in fullscreen mode

--no-auto-update

Disable update checks for this session. Use GROK_DISABLE_AUTOUPDATER=1 to disable them per process, or the auto_update setting to disable them persistently.

Examples

grok -p "..." --no-auto-update
Run without checking for updates

Slash Commands

/new

Start a new session, clearing the current conversation.

Notes

  • Alias: /clear

/resume

Open the session picker to load a previous session from disk.

/quit

Quit the application.

Notes

  • Alias: /exit

/home

Exit the current session and return to the welcome screen.

Notes

  • Alias: /welcome

/delete

Delete the current session's history and return to the welcome screen. Confirms first.

Notes

  • To delete a session you are not in, open /resume and press d then y

/help

Browse and search available commands and keyboard shortcuts.

/rename <title|--auto>

Rename the current session.

Notes

  • Alias: /title
  • --auto — Unpins a manual title so auto-titling resumes. Must be the only argument, and applies to Build sessions only (documented in 1.0.4)

/share

Share the current session via URL.

/session-info

Show details of the current session, including auth method, model, turn count, and context usage.

/compact [context]

Compress conversation history to save context window space; optional context arg specifies what to preserve. Auto-compacts at 85% usage by default.

/context

Show context window usage and session stats, including token costs for skills and MCP servers.

/fork [--worktree|--no-worktree] [directive]

Branch the current session into a peer agent starting from a copy of the conversation. Optional directive sets the fork's first prompt.

/rewind

Rewind the conversation to an earlier turn, restoring files to that state and truncating history after it. Modifies files on disk (unrecoverable without git).

Notes

  • Alias: /undo

/copy [N]

Copy the most recent (or Nth-latest) response to the clipboard. Pass a file path to write to a file instead of the clipboard. Every copy is also written to a backup file (~/.grok/last-copy.txt by default, or GROK_COPY_FILE if set).

Examples

/copy 2
Copy the second-latest response
/copy out.txt
Write to a file instead of the clipboard (useful over SSH)

/export

Export the current conversation to a file or the clipboard.

/find

Search the conversation scrollback.

/transcript

View the full transcript in your pager ($PAGER).

/model <name> [effort]

Switch to a different model by ID or display name (case-insensitive). Optional second argument sets reasoning effort.

Notes

  • Alias: /m

Examples

/model Reasoning X high
Switch model and set effort in one command

/effort <level>

Set reasoning effort on the current model without re-selecting it.

Notes

  • Levels: low, medium, high, xhigh

/always-approve

True toggle: skip all permission prompts when off, revert to ask when already on.

/auto

True toggle: classifier auto-approves safe tools when off (dangerous ones may still prompt), reverts to ask when already on.

/plan [description]

Enter plan mode; activates when you send the next prompt, or immediately starts a turn with the given description.

/view-plan

Open a preview of the current saved plan.

Notes

  • Aliases: /show-plan, /plan-view

/multiline

Toggle multiline input mode (Enter inserts newline, Shift+Enter/Alt+Enter sends).

Notes

  • Alias: /ml

/history

Open prompt-history search: fuzzy-search this session's prompts, newest first.

/compact-mode

Toggle compact display mode, which reduces padding and visual spacing for denser output.

/vim-mode

Toggle vim-style scrollback keybindings (j/k, h/l, g/G, y/Y, and more). Persists to [ui].vim_mode in config.toml.

/minimal

Switch the current session to the experimental scrollback-native render mode (minimal mode). The switch happens inside the running process, so nothing restarts: a running turn keeps streaming and your composer draft, queued prompts and permission mode all carry over. Session-scoped only; it does not write config.toml.

Notes

  • Offered only while you are in fullscreen. /find, /jump, /timeline, /theme, /tutorial and /dashboard are fullscreen-only and stay hidden in minimal mode
  • To change the default startup mode use Default screen mode in /settings or [ui] screen_mode. The in-place switch arrived in 1.0.9 (GROK_SCREEN_MODE_SWITCH=exec restores the old relaunch behavior)

/fullscreen

Switch back from minimal mode to the standard alt-screen TUI (fullscreen mode). The switch happens inside the running process, so nothing restarts: a running turn keeps streaming and your composer draft, queued prompts and permission mode all carry over. Session-scoped only; it does not write config.toml.

Notes

  • Alias: /full
  • The in-place switch arrived in 1.0.9. --no-alt-screen still counts as fullscreen here, so the fullscreen-only commands keep working

/timestamps

Toggle message timestamps on or off.

/memory [on|off]

Browse/view/manage saved memories, or pass on/off to enable/disable memory for the session.

Notes

  • Alias: /mem
  • Requires memory enabled via GROK_MEMORY=1, [memory] enabled = true, or managed remote settings

/flush

Save current session knowledge to memory immediately, triggering an LLM-generated summary of the session's most important content. Use it before compaction or whenever you want to preserve important context.

Notes

  • Requires memory enabled via GROK_MEMORY=1, [memory] enabled = true, or managed remote settings

/dream

Run memory consolidation, merging session logs into organized topics.

Notes

  • Requires memory enabled via GROK_MEMORY=1, [memory] enabled = true, or managed remote settings

/remember <text>

Save a note to memory immediately (workspace MEMORY.md for project-specific items, global for cross-project). Always available even without the memory feature enabled.

/hooks

Open the extensions modal on the Hooks tab: view, add, remove, enable/disable hooks.

/plugins

Open the extensions modal on the Plugins tab: view installed plugins, install from marketplace, manage trust.

/marketplace

Open the extensions modal on the Marketplace tab to browse and install plugins.

/skills

Open the extensions modal on the Skills tab to view installed skills.

/mcps

Open the MCP servers management modal: enable/disable servers, view tools, refresh, authenticate OAuth, add/remove.

/imagine <prompt>

Generate an image from a text description.

Examples

/imagine a golden sunset over a calm ocean
Generate an image from text

/imagine-video <prompt>

Generate a video from an image or text description. Plans shots, generates source images, and animates them.

/loop [interval] <prompt>

Run a prompt on a recurring interval. Fires immediately, then repeats; auto-expires after 7 days.

Notes

  • Interval format: Ns (min 60), Nm, Nh, Nd
  • A prompt that includes a stop condition is stored with that condition, so the recurring task terminates itself once the condition is met

Examples

/loop 5m Check if the test suite passes and report any failures
Periodic test check

/tasks

List background tasks, subagents, and scheduled tasks.

/queue

List the prompts queued behind the running turn.

/goal <objective|status|pause|resume|clear>

Set, manage, or check an autonomous goal the agent works toward across turns. Only appears when the goal feature is enabled.

/btw <question>

Send an aside question to the agent without interrupting the current task (side Q and A, not part of the main turn).

Examples

/btw also check the error handling
Ask a side question without stopping the running task

/dashboard

Open the Agent Dashboard. Switching, renaming, and closing active sessions and forks also happens here.

Notes

  • Aliases: /agents-dashboard, /sessions

/theme [name]

Open the theme picker with live preview via arrow keys, or switch directly by name. Bare /theme cycles to the next theme.

Notes

  • Alias: /t

Examples

/theme tokyonight
Switch directly to a named theme

/docs [web|<title>]

Bare /docs opens the in-TUI How-to Guides picker; /docs web opens the online documentation; /docs followed by a guide title jumps to that guide.

Notes

  • Aliases: /howto, /guides

/settings

Open the settings modal to view/change configuration interactively.

Notes

  • Aliases: /config, /preferences, /prefs

/config-agents

Open the agents modal to view and manage agent definitions, set the default agent, and switch the active one.

Notes

  • Alias: /agents

/personas

Manage personas (create, edit, and delete). A subagent can apply a persona to shape its behavior.

/import-claude

Open the Claude settings import modal to bring over ~/.claude settings: permissions, environment variables, MCP servers, hooks, and paths.

/terminal-setup

Show terminal capability detection and setup info, including color level, available themes, clipboard routes, and fix instructions for common issues (truecolor, tmux clipboard, keyboard protocol).

Notes

  • Aliases: /terminal-check, /terminal-info

/feedback [message]

Report an issue or send feedback. Image attachments such as screenshots are supported since 1.0.9.

/release-notes

View release notes for the current version.

Notes

  • Alias: /changelog

/usage

View credit usage or manage billing.

/privacy

Show or toggle privacy and data-retention status. On team accounts, only a team admin can toggle it.

Examples

/privacy opt-out
Opt out of data retention

/login

Log in or re-authenticate without leaving the session.

/logout

Log out and return to the login screen.

/deep-research <query>

Kick off a background research workflow. It plans a bounded set of questions, gathers structured claims with source evidence, cross-checks each claim on an independent verifier shard, and renders only the claims that survive with their verified source locators. Follow progress in /workflows.

Examples

/deep-research Compare the migration risks of PostgreSQL 17 and MySQL 9
Generate a verified research report on the given topic

/workflow [<name>|runs|pause|resume|stop|save]

Launch a saved workflow, or manage a running one by its session-unique display name. Bare /workflow prints a text overview of this session's runs, and /workflow runs opens the live run dashboard.

Notes

  • runs — opens the live Workflow Runs dashboard in the fullscreen TUI. Each row shows the run's display name, phase, agent roster, progress and result; in a run's detail view p pauses, r resumes, x stops and s saves the run's script. In minimal mode and non-TUI clients it prints the same text overview as bare /workflow
  • pause / resume / stop / save <name> — act on this session's run handles to pause, resume, stop or save the script. A bare /workflow stop does not pick a run
  • Type /workflow and a space to autocomplete saved workflow names (built-in, project and user) plus the manage verbs runs, pause, resume, stop and save. Picking a name fills it in but does not launch until you press Enter (added in 1.0.8)
  • --agent-budget N — cumulative cap on child-agent calls (default 128, explicit values run 1–1,024). --effort LEVEL — sets child reasoning effort without changing the session's own /effort
  • Launch the same workflow twice and the display names are numbered (review-changes, review-changes-2), so you never need the internal run IDs. Project workflows live in .grok/workflows/*.rhai and user workflows in ~/.grok/workflows/*.rhai

Examples

/workflow review-changes
Launch a saved workflow
/workflow runs
Open the live run dashboard
/workflow pause review-changes
Pause a running workflow

/workflows

Open the extensions modal on the Workflows tab — a browse-only catalog of the saved workflows Grok discovered (built-ins, project .grok/workflows/ and user ~/.grok/workflows/), each with its source, description and path.

Notes

  • Launch one with /workflow name (or its own slash command), then watch it in /workflow runs
  • /hooks, /plugins, /marketplace and /skills open the same extensions modal, each on its own tab. Ctrl+L and the Ctrl+P command palette also reach it
  • The same catalog is listed for the model under the skill listing in the session preamble
  • The role changed in 1.0.7: it previously opened the live dashboard of running workflows, which has moved to /workflow runs

/edit-prompt

Open an external editor for the prompt, in either render mode. Grok resolves $VISUAL, then $EDITOR, then vi. Typing /edit-prompt replaces the composer contents, so the editor starts from an empty draft. Saving replaces the draft without sending it, and saving an empty file clears it.

Notes

  • To edit an existing draft, choose Edit Prompt in External Editor from the command palette (or press Ctrl+G in minimal mode); it preserves the text and refuses pasted, file-reference or image chips rather than flattening them
  • Since 1.0.9 it opens the external editor from the full TUI too, not only minimal mode

/doctor

Check the current session for terminal, clipboard, color, input, notification, and sandbox issues. Shows what it found and how to resolve each issue; fix lists available automatic fixes, other findings include manual steps. Aliases: /terminal-setup, /terminal-check, /terminal-info.

Notes

  • fix: list available automatic fixes

/tutorial

Open the onboarding tutorial: a short list of topics covering your first prompt, attaching context, navigation, slash commands, worktrees, plan mode, customization, and switching from another agent tool. Each topic is about a 30-second read. Nothing shows automatically, so this command or the command palette is the way in.

Notes

  • Aliases: /tour, /onboarding
  • Pick a topic to open it, then flow straight on to the next one

/resume-claude

A bundled skill that continues a recent Claude Code session inside Grok Build. Pass the session ID from the original tool to pick that conversation back up here.

Notes

  • Toggle the compat source on or off in the [compat.claude] config section
  • Ships as a bundled skill, so it is available as a slash command

/resume-codex

A bundled skill that continues a recent Codex CLI session inside Grok Build. Pass the session ID from the original tool to pick that conversation back up here.

Notes

  • Toggle the compat source on or off in the [compat.codex] config section
  • Ships as a bundled skill, so it is available as a slash command

/resume-cursor

A bundled skill that continues a recent Cursor session inside Grok Build. Pass the session ID from the original tool to pick that conversation back up here.

Notes

  • Toggle the compat source on or off in the [compat.cursor] config section
  • Ships as a bundled skill, so it is available as a slash command

Keyboard

Ctrl+C
Cancel the running turn (or clear a non-empty draft first, mid-turn).
Esc
Cancel the running turn immediately (the draft is preserved). Disabled in fullscreen vim scrollback mode — use Ctrl+C there instead. Overlays, modals, search, and dropdowns close first when open.
EscEsc
Idle + non-empty prompt: clears the draft (first press shows a warning). Idle + empty prompt + messages: opens the rewind picker. The second Esc must be pressed within 800ms of the first.
Ctrl+O
Toggle always-approve (YOLO) mode.
Shift+Tab
Prompt focused: cycle session mode Normal → Plan → Auto (when enabled) → Always-approve. Since 1.0.11, subagent messages are allowed automatically in permission Auto mode.
Ctrl+P/?
Open the command palette (searchable list of shortcuts, slash commands, and skills).
Ctrl+./Ctrl+X
Open the keyboard shortcuts list inside the TUI; entries that do not apply in the current context are dimmed. Use Ctrl+X on Windows and in terminals without the Kitty keyboard protocol.
F2
Open the settings modal. Ctrl+, (or Cmd+, on macOS) also works.
Tab
Toggle focus between the prompt input and the scrollback pane.
Ctrl+Enter
Send now (interject): cancels the current turn and sends the message immediately, or force-sends the top queued follow-up on an empty composer.
Shift+Enter
Insert a newline (or send, in multiline mode). Use Alt+Enter where Shift+Enter is unsupported.
Ctrl+M
From scrollback: open the model picker. With prompt focused: toggle multiline input mode instead.
Ctrl+R
Search prompt history.
!
Type ! on an empty prompt to enter shell mode.
Ctrl+S
Stash and pop the prompt draft, git stash style (Alt+S is an alias). With text or images in the composer it stashes them and starts fresh; on an empty composer it restores the newest stash, images and ! shell mode included.
Ctrl+N
Create a new session, optionally in a git worktree. Requires a double-press within 1000ms to confirm.
Ctrl+Q
Quit the application. Double-press within 1000ms to confirm.
Ctrl+T
Toggle the todos pane (agent view).
Ctrl+B
Send the running foreground command to the background (agent screen).
Ctrl+;/Ctrl+'
Toggle the prompt queue pane (when non-empty). On local macOS VS Code-family terminals the primary chord is Ctrl+4.
Ctrl+L
Open the extensions modal. On VS Code, Cursor, Windsurf, and Zed, Ctrl+L is mid-turn interject instead, so open extensions via /plugins or /hooks.
Ctrl+\
Open (or return to) the Agent Dashboard.
Ctrl+G
In the full TUI, toggle the tasks pane listing running subagents and background commands. In minimal mode's ordinary composer, edit the current draft in an external editor without sending it.
j/Down
Scrollback focused: select the next entry.
k/Up
Scrollback focused: select the previous entry.
Shift+L/Shift+H
Jump to the next / previous turn (user prompt) when the scrollback is focused. Arrow-key equivalents are Shift+Right / Shift+Left.
Shift+J/Shift+K
Jump to the next / previous assistant response when the scrollback is focused.
g/Shift+G
Go to the top / bottom of the scrollback (scrollback focused; bare-letter keys require vim mode).
Ctrl+U/Ctrl+D
Scroll half a page up / down. In VS Code-family terminals, scroll down is Shift+D.
PageUp/PageDown
Scroll one page up / down.
h/l
Collapse / expand the selected entry. Arrow-key equivalents are Left / Right.
e/Shift+E
Toggle the fold on the selected entry (e), or expand / collapse all entries (Shift+E).
Ctrl+E
Expand or collapse all thinking blocks at once.
r
Toggle raw markdown on the selected entry.
y
Copy the selected block's content to the clipboard. In the plan approval or preview view, this copies the full plan markdown.
Shift+Y
Copy the selected block's metadata, such as the shell command, to the clipboard.
Enter/Ctrl+F
Open the selected block's content in the fullscreen viewer (scrollback focused).
/
Search the scrollback (vim mode).
x
Kill the selected background task.
Ctrl+XCtrl+X
In the Agent Dashboard, select an idle session row and press Ctrl+X twice to permanently delete that session.
dy
On the welcome screen's session list, press d then confirm with y to permanently delete the selected session.
Shift+Arrow/Alt+Shift+Arrow/Cmd+Shift+Arrow
With the prompt focused, Shift+arrow keys extend a text selection just like a standard text field.
F3
Open the session picker to resume a previous session — the same action as /resume. On the agent screen it opens as a modal overlay, and the same key works on the welcome screen.
Press it on an empty prompt with the composer focused, in normal input mode. With prompts queued it moves focus into the queue pane with the last row highlighted; otherwise it opens the history panel with your last prompt filled in.

Configuration

~/.grok/config.toml

Main user configuration file. If absent, Grok uses built-in defaults; only override the values you need.

Notes

  • Precedence: CLI flags > env vars > config.toml > managed/requirements config > built-in defaults

.grok/config.toml (project-scoped)

Per-project config: contributes [mcp_servers], [plugins], and [permission] rules only (other sections load only from ~/.grok/config.toml).

Notes

  • Discovered at every directory level from repo root to cwd; deepest/cwd file wins for mcp_servers/plugins

~/.grok/pager.toml

TUI appearance configuration (layout, scrollback, animation, block styling, themes). Changes apply on restart.

Notes

  • [scrollback.display] rtl_bidi — reorder right-to-left text such as Arabic and Persian in the app. Leave it off when your terminal already handles bidi (documented in 1.0.4)

[models] default / web_search / temperature / top_p / ...

Global model settings: 'default' picks the model for new sessions, 'web_search' picks the model behind the web_search tool, and the rest are default sampling/request parameters applied to every model unless overridden per-model. 'allowed_models' is a glob allowlist for the model picker, the default and -m, and an empty value means no restriction; pinning it in a signed requirements.toml lets an enterprise policy restrict which models users may select (added in 1.0.16).

[model.<name>]

Defines a custom model endpoint or overrides fields of a built-in model.

Notes

  • Keys: model, base_url, api_backend (chat_completions|responses|messages), api_key, env_key, temperature, context_window, extra_headers, query_params (appends query parameters to every request URL), env_http_headers (resolves headers from environment variables). query_params/env_http_headers can also be inherited from a shared [model_providers.<id>] block

Examples

[model.claude-opus]
model = "claude-opus-4-6"
base_url = "https://api.anthropic.com/v1"
api_backend = "messages"
Add Claude via the Anthropic Messages API

[ui] vim_mode / screen_mode / permission_mode / ...

TUI display and interaction settings: vim_mode (vim-style keybindings), screen_mode (fullscreen/minimal), permission_mode (ask/always-approve), simple_mode, show_thinking_blocks, and notification settings ([ui.notifications]).

Notes

  • follow_up_behavior — how a follow-up typed mid-turn is handled. queue waits for the current turn to end (default); steer injects it at the next safe gap between a tool call and the model (added in 1.0.4)

[ui] default_selected_permission

Sets which row of the approval menu is preselected on the FIRST prompt of a session (added in 1.0.11). One of always_allow_all_sessions (default), allow_command_always, allow_once, or reject.

Notes

  • always_allow_all_sessions — preselect the "Always allow on all sessions" row (default)
  • allow_command_always — preselect the "Always allow this command" row. That row is always scoped to the specific action being approved (command / tool / domain / edit session), never a global allow-everything
  • allow_once — preselect the "Yes" / allow-once row
  • reject — preselect the reject row
  • After you answer the first prompt the cursor turns sticky: every later prompt preselects whatever you last confirmed, carrying across edit / bash / MCP prompts until you restart. So this setting only picks the starting point
  • Values match case-insensitively; an unset or unrecognized value falls back to always_allow_all_sessions. The per-command "Always allow" rows appear while [ui] remember_tool_approvals is enabled (the default)
  • GROK_DEFAULT_SELECTED_PERMISSION overrides it (precedence: env var → config.toml → always_allow_all_sessions)

Examples

[ui]
default_selected_permission = "allow_once"
Preselect the allow-once row on the first approval prompt

[ui.status_line] type / items / command / padding / refresh_interval

An optional row at the bottom of the pager — above the shortcuts bar in fullscreen, under the prompt's info row in minimal mode. It shows live session context such as the model, context-window usage, cost, directory and git worktree, or the output of any script you configure. Disabled by default.

Notes

  • type — builtin, command or disabled. The default is disabled (off, none and hidden are accepted spellings)
  • items — which built-in segments to show, in order: cwd, model, context, cost, turn-timer and session-name (default: cwd, model, context)
  • command — the script to run when type = command. Grok pipes session JSON to its stdin and shows its stdout (up to 5 lines, 1024 characters per line, 10 second timeout)
  • padding — horizontal spacing in characters per side (default 0, capped at 16). refresh_interval — command rows only, 1 to 86,400 seconds, re-runs the script on a timer
  • Grok reads the section at startup, so restart it after editing. A project-scoped .grok/config.toml cannot set it: only your own ~/.grok/config.toml and administrator-managed configuration can (added in 1.0.6; the row also renders in minimal mode from 1.0.9)

Examples

[ui.status_line]
type = "builtin"
items = ["cwd", "model", "context"]
Enable the status line with built-in segments

[features] telemetry / lsp_tools / codebase_indexing / ...

Feature flags. Toggle individual features such as telemetry (anonymous usage stats), feedback, lsp_tools, codebase_indexing, and remote_fetch.

[session] auto_compact_threshold_percent / load_envrc

Session behavior settings: auto_compact_threshold_percent (auto-compact when context usage reaches this percentage; default 85) and load_envrc (load .envrc environment variables).

[tools] respect_gitignore / [tools.media_gen]

Shared tool behavior. Set respect_gitignore to true to make every tool skip gitignored files (default false). The [tools.media_gen] sub-table caps parallel media generation within a single model step.

Notes

  • respect_gitignore — true makes every tool skip gitignored files (default: false)
  • [tools.media_gen] max_parallel_image_gen_calls — cap on parallel image generation per step (default: 8)
  • [tools.media_gen] max_parallel_video_gen_calls — cap on parallel video generation per step (default: 4)
  • The GROK_MAX_PARALLEL_IMAGE_GEN_CALLS / GROK_MAX_PARALLEL_VIDEO_GEN_CALLS environment variables override these values

[toolset.bash] / [toolset.web_fetch] / [toolset.web_search] / [toolset.ask_user_question]

Per-tool settings: bash execution timeout and output cap, web_fetch proxy and allowed domains, web_search domain restrictions, and the ask_user_question answer timeout. Config is read at session start, so edit it before starting a session.

Notes

  • [toolset.bash] timeout_secs / output_byte_limit — foreground command timeout (default 120s) and max captured output in bytes (default 20000)
  • [toolset.web_fetch] proxy_endpoint / allowed_domains / allow_local — egress proxy, override the built-in allowlist, and permit loopback hosts (default false)
  • [toolset.web_search] allowed_domains / excluded_domains — restrict which domains web_search runs against (allowlist caps at 5). The two are mutually exclusive, and a configured policy overrides the model's own per-call list (added in 1.0.4)
  • [toolset.ask_user_question] timeout_enabled / timeout_secs — automatic questionnaire timeout (enabled by default, 1800s)

[auth] / [grok_com_config.oidc]

Authentication settings: external auth provider command, token TTL, and OIDC issuer / client_id under [grok_com_config.oidc]. Also used to pin the auth method (API key vs OIDC).

[mcp_servers.<name>]

MCP server definition.

Notes

  • stdio: command, args, env, enabled, startup_timeout_sec, tool_timeout_sec
  • HTTP/SSE: url, headers

[permission] rules / allow / deny / ask

Native permission rule config. Since 1.0.11, mkdir and touch no longer prompt in auto mode or in safe-command lists.

Notes

  • Structured: rules = [{ action, tool, pattern }]
  • Compact: allow/deny/ask arrays of ToolPrefix(glob) strings, same syntax as --allow/--deny

~/.grok/sandbox.toml — [profiles.<name>]

Custom sandbox profiles.

Notes

  • Fields: extends (base built-in profile, default workspace), restrict_network, read_only, read_write, deny (kernel-enforced glob deny)

Examples

[profiles.project]
extends = "workspace"
restrict_network = true
deny = ["/data/shared-secrets", "**/.env"]
Custom sandbox profile that blocks secrets

[skills] paths / ignore / disabled

paths: additional directories to scan for SKILL.md files. ignore: paths to exclude entirely. disabled: skill names to keep listed but inactive.

[plugins] paths / disabled / enabled

paths: additional plugin directories. disabled: plugin IDs to skip. enabled: plugin IDs to force on (plugins are off by default unless enabled here or via a CLI override).

[subagents] enabled / toggle / models

Subagent settings: enabled toggles the whole feature, [subagents.toggle] switches specific types (explore, plan, and so on), and [subagents.models] routes subagents to different models.

Notes

  • sampling_limit — cap on concurrent in-flight subagent sampling calls per process; it defaults to max_concurrent (32) when unset. Also settable with GROK_SUBAGENT_SAMPLING_LIMIT (added in 1.0.9)

[memory] enabled / [memory.session] / [memory.dream]

Master memory switch (default false, experimental). Sub-tables control save-on-end behavior and automatic Dream consolidation gates. Version 1.0.4 consolidated how it is turned on: use GROK_MEMORY=1, [memory] enabled = true, or managed remote settings (the dedicated CLI flags were dropped from the official docs).

[compat.cursor] / [compat.claude] / [compat.codex]

Compatibility settings for other AI coding tools. Toggle discovery (scanning) of Cursor / Claude Code skills, rules, agents, MCP servers, and hooks per item.

[telemetry] events_url / otel_enabled / ...

Detailed telemetry settings: redirect to your own collector (events_url), disable Mixpanel, disable trace uploads, and configure the external OpenTelemetry stream (otel_enabled, otel_endpoint, and more).

Notes

  • otel_certificate / otel_client_certificate / otel_client_key — PEM paths for private-CA trust and an mTLS client identity. Never embed private key material in TOML (added in 1.0.4)

[cli] minimum_version / maximum_version / required_minimum_version / required_maximum_version

Control which versions the CLI may auto-update to and which versions may run, set in the [cli] section or in a managed layer for fleet-wide policy. minimum_version and maximum_version are soft bounds for the updater; required_minimum_version and required_maximum_version are hard bounds that refuse startup outside the range. Each key has an environment override that can only tighten the bound.

Notes

  • minimum_version (GROK_MINIMUM_VERSION): a soft anti-downgrade floor for the updater. It no longer blocks startup, unlike the previous behavior
  • maximum_version (GROK_MAXIMUM_VERSION): a soft ceiling. The updater caps its target at it and never installs above it
  • required_minimum_version / required_maximum_version (GROK_REQUIRED_MINIMUM_VERSION / GROK_REQUIRED_MAXIMUM_VERSION): the CLI exits at startup outside the range and asks for an approved version. grok update and grok --version keep working
  • Bounds resolve across config layers by tightening only (a floor takes the highest value, a ceiling the lowest), so a managed bound cannot be loosened by a user or environment bound, and an invalid value is ignored

Examples

GROK_REQUIRED_MINIMUM_VERSION=0.2.100 grok
Temporarily tighten the minimum version allowed to start, via an environment override

[shell_environment_policy] inherit / ignore_default_excludes / exclude / include_only / set

A top-level table in sandbox.toml that controls which environment variables a subprocess inherits, so a tool command the model runs cannot read a secret that happens to sit in your shell environment. Enforcement covers the bash tool and terminals on macOS, Linux, and Windows.

Notes

  • inherit: all (default, keeps everything) / core (a small platform set such as PATH and HOME) / none (starts empty)
  • ignore_default_excludes: turn off the built-in exclusion of names containing KEY, SECRET, or TOKEN
  • exclude: drop these variable names, given as case-insensitive globs
  • include_only: when set, keep only the matching names
  • set: force these values
  • The order is inherit, built-in secret patterns, exclude, set, then include_only. The default (inherit = all, ignore_default_excludes = true) leaves the environment untouched

AGENTS.md / CLAUDE.md project rules

Project instruction files, checked per directory in this order: Agents.md, Claude.md, CLAUDE.md, CLAUDE.local.md, AGENT.md, AGENTS.md (all matches load).

Notes

  • Deeper directories take precedence. Global: ~/.grok/AGENTS.md

XAI_API_KEY

API key from console.x.ai, used as the auth fallback when no session token is active.

Notes

  • Also accepted: GROK_CODE_XAI_API_KEY (backward compatibility)

Examples

export XAI_API_KEY="xai-..."
Authenticate for CI/CD

GROK_HOME

Overrides the config/data directory, default ~/.grok.

GROK_CONFIG / GROK_CONFIG_PATH

Environment variables that inject a config overlay. GROK_CONFIG takes an inline JSON object; GROK_CONFIG_PATH points at an additional config file (JSON when the extension is .json, TOML otherwise). The overlay is deep-merged on top of config.toml but sits below requirements.toml / MDM, so an enterprise pin still wins. Use it to pass settings from a harness or ACP client without writing a config.toml (documented in 1.0.4).

Notes

  • GROK_CONFIG — apply an inline JSON object as the overlay. Wins when both are set
  • GROK_CONFIG_PATH — read an additional config file (not a replacement for config.toml)
  • Confined to models / features / a narrowed toolset / the filter fields of shell_environment_policy, so it is not a permission-escalation path

Examples

GROK_CONFIG='{"models": {"default_reasoning_effort": "high"}}' grok agent stdio
Start the ACP agent with the default reasoning effort set to high

GROK_EXTRA_CA_BUNDLE

Loads additional custom TLS root certificates. Point it at a bundle for a corporate proxy or a private certificate authority.

Notes

  • Added in 0.2.117. Loads extra root certificates on top of the defaults
  • So far documented only in the changelog (bundled changelogs/0.2.117.md and x.ai/build/changelog), not yet in the settings catalog (docs.x.ai/build/settings or user guide 05-configuration.md)

Examples

export GROK_EXTRA_CA_BUNDLE="/etc/ssl/certs/corp-ca.pem"
Start with a corporate CA certificate added

GROK_AUTH_PROVIDER_COMMAND

Path to an external auth binary.

GROK_AUTH_PROVIDER_LABEL

Display name for the auth provider on the TUI login screen.

GROK_AUTH_TOKEN_TTL

Token lifetime in seconds.

GROK_AUTH_EARLY_INVALIDATION_SECS

How many seconds before expiry the token is refreshed (default: 300).

GROK_OIDC_ISSUER

OIDC issuer URL.

GROK_OIDC_CLIENT_ID

OIDC client ID.

GROK_CLI_CHAT_PROXY_BASE_URL

Override the API proxy base URL.

GROK_MEMORY

Enable (1) or disable (0) cross-session memory. Since 1.0.4 it is also the only way to force memory off for a process.

GROK_SUBAGENTS

Enable (1) or disable (0) subagents.

GROK_WORKFLOWS

Enable (1) or disable (0) background workflows and select the /goal driver. The default is on, using the host-owned workflow driver; off uses the legacy update_goal.

GROK_WEB_FETCH

Enable (1) or disable (0) the web_fetch tool.

GROK_WEB_FETCH_ALLOW_LOCAL

Allow web_fetch to reach explicit loopback hosts only (localhost, 127.0.0.0/8, ::1). Same as the allow_local setting.

GROK_AGENT

Path to a custom agent definition file, or the agent name.

GROK_SANDBOX

Sandbox profile to use (off, workspace, devbox, read-only, strict, or a custom profile name).

GROK_EXIT_TIMEOUT_SECS

Seconds after a quit is requested before the process is force-exited if teardown hangs. The default is 20 and 0 disables it; a hard exit follows 5 seconds later.

GROK_LOG_FILE

Write logs to this file path. The value is used verbatim as the path.

RUST_LOG

Log level filter, for example debug. It controls both the GROK_LOG_FILE log and headless stderr output.

GROK_RESPECT_GITIGNORE

Force gitignore filtering on (1) or off (0). It overrides the respect_gitignore setting.

GROK_TELEMETRY_ENABLED

Enable or disable telemetry.

GROK_TELEMETRY_TRACE_UPLOAD

Enable or disable session trace upload.

GROK_TELEMETRY_MIXPANEL_ENABLED

Enable or disable Mixpanel specifically.

GROK_EXTERNAL_OTEL

Send external OTEL data to your own collector.

GROK_FEEDBACK_ENABLED

Enable or disable the feedback system.

GROK_DEPLOYMENT_KEY

Management API key for enterprise deployments.

GROK_DEFAULT_SELECTED_PERMISSION

Overrides [ui] default_selected_permission (added in 1.0.11). Handy for headless or agent test runs that shouldn't mutate config.toml.

Notes

  • Takes the same four values as [ui] default_selected_permission (always_allow_all_sessions / allow_command_always / allow_once / reject), matched case-insensitively
  • Precedence: env var → config.toml → always_allow_all_sessions (the fallback for an unset or unrecognized value)

Examples

GROK_DEFAULT_SELECTED_PERMISSION=reject grok
Start with the reject row preselected on approval prompts, without touching config.toml

Workflows

grok -p "Review changes..." --output-format json --yolo | jq -r '.text' > review.md

Run Grok headlessly with JSON output and always-approve mode, then extract the text field for a CI code review artifact.

grok -p "Review staged changes..." --yolo --output-format json | jq -r '.text' | grep -q "^OK" || exit 1

Gate a git pre-commit hook: fail the commit unless the model's headless reply starts with OK.

grok -p "Review the PR" --output-format json | jq -r '.sessionId'

Capture the sessionId from a JSON headless response and pass it to --resume for follow-up calls that share context.

Examples

grok -p "Now check for security issues" --resume "<id>"
Continue in the captured session

grok -p "..." --allow "Bash(git *)" --allow "Bash(gh *)"

Combine --allow rules with a PreToolUse hook that denies any Bash segment not starting with git or gh, so headless automation stays scoped.

grok plugin marketplace add my-org/team-plugins

Register a git-hosted marketplace, list its plugins, install one with trust, and keep it updated.

Examples

grok plugin marketplace list
List plugins available from registered marketplaces
grok plugin install my-org/team-plugins --trust
Install and trust a plugin from the marketplace

for file in src/*.js; do grok -p "Migrate $file to ES modules." --yolo; done

Loop over a file glob, invoking a fresh headless Grok run per file with --yolo for unattended batch automation.

Version history

The Grok Build versions and key changes used to verify the data on this page.

1.0.16 (September 1, 2026)

View official changelog

  • Enterprise policies can now restrict which models users may select by pinning models.allowed_models in a signed requirements.toml (noted in the description of the [models] config entry; the item count stays at 250)
  • MCP servers can now be supplied at session bind time for workspace integrations (an SDK/ACP-level capability with no config key or flag in the official user guide, so it is not carried as an entry on this page)
  • Long-running subagent and task output waits now default to a one-hour ceiling instead of ten minutes
  • Long-running sessions interrupted by expired tokens during network issues no longer lose work
  • MCP server OAuth authentication triggered from /mcps no longer deadlocks the session
  • Sending a message immediately after spawning a subagent no longer fails while the child is still starting
1.0.15 (August 31, 2026)

View official changelog

  • A tip now appears after repeated scrollback drag-copies, suggesting the /copy and /export commands
  • Session close is now faster because memory consolidation runs at the next launch instead of blocking exit
  • Typed input including Enter during pager startup is now preserved and correctly interpreted as submit or newline
  • Dock panel input and rollout now respect remote settings and handle keyboard focus correctly when hidden or empty
  • First reply latency is reduced by opening the model connection in the background when a session starts
  • Creating a new session returns faster because MCP tools and other startup work now happen in the background
1.0.14 (August 31, 2026)

View official changelog

  • PostToolUse hooks, including those registered through the SDK, can now provide feedback and context to the model after a tool runs
  • grok usage <session-id> now shows persisted per-turn token and cost data
  • Models can now declare a different identifier for each reasoning-effort level instead of always sending the same id
  • OIDC token refresh is now proactive by default for better reliability
  • Windows CLI downloads are about 70% smaller, using the same compressed sidecars as macOS and Linux
  • --sandbox strict now restricts writes to ~/.grok/sessions only
  • Failed task and todo tool calls now appear in the transcript instead of disappearing without a trace
  • Subagent sessions no longer leak threads or file descriptors when the parent is busy
  • Remote settings are now fetched only once per boot, and warm starts serve them from a local cache
1.0.13 (August 28, 2026)

View official changelog

  • The grok usage subcommand, which prints a session's per-turn token and cost totals as JSON, is now documented in the official user guide (added to the CLI commands category, taking this page from 249 to 250 items)
  • Length-truncated responses now continue automatically instead of failing the turn
  • Hooks can now ask the user to confirm a tool call instead of always allowing or denying it
  • Hooks can now request deferral or add context shown to the model after a tool runs
  • Transient inference failures (stalls, drops, 5xx) now retry automatically instead of ending the turn
  • Pasted images now show a live pixel preview in the prompt box on iTerm2
1.0.12 (August 27, 2026)

View official changelog

  • Copying wrapped table cells no longer inserts unwanted spaces at the line breaks
  • MCP server connections that fail transiently now retry instead of staying unavailable
  • Waiting on subagents after an interjection no longer blocks on unrelated background work
  • Prompt blocks now show friendly hook descriptions instead of internal IDs
  • Worktree creation is faster because it skips stale reflog copies
1.0.11 (August 26, 2026)

View official changelog

  • The default permission mode for new interactive sessions is now configurable ([ui] default_selected_permission and the GROK_DEFAULT_SELECTED_PERMISSION environment variable were added to the config category, taking this page from 247 to 249 items)
  • Headless sessions are now browsable and resumable from the resume picker without mixing into the default history
  • mkdir and touch no longer raise permission prompts in auto mode or in safe-command lists
  • Subagent messages are now allowed automatically in permission Auto mode
  • Turn duration and the turn footers (Worked for, cancelled, failed) now appear after /resume as well
1.0.10 (August 24, 2026)

View official changelog

  • grok clone now reuses matching local checkouts as linked worktrees, making session creation faster
1.0.9 (August 24, 2026)

View official changelog

  • grok clone now fetches only the selected branch tip by default (depth-1); pass --full-history for the complete history, tags and every remote branch as before
  • grok clone can now reuse a matching local checkout as a linked worktree instead of always fetching from the network
  • /minimal and /fullscreen now switch instantly inside the running session, without restarting or losing the current turn; the draft, queued prompts and permission mode all carry over
  • /edit-prompt is no longer minimal-mode only: it now opens an external editor from the full TUI as well
  • The configurable status line row now appears at the bottom of minimal mode as well as fullscreen
  • /workflow now accepts --agent-budget N for the cumulative child-agent cap and --effort LEVEL for child reasoning effort
  • /feedback now supports attaching images such as screenshots
  • Up arrow on an empty prompt now selects queued follow-ups first instead of opening history
  • Sending a new message while a shell command is running now moves the command to the background instead of cancelling it
  • /new and /clear now preserve the last-chosen reasoning effort instead of resetting to the model default
  • Interactive sessions start in ask mode by default again instead of auto
1.0.8 (August 20, 2026)

View official changelog

  • Ctrl+S changed role: it now stashes and pops the prompt draft, git stash style. With text or images in the composer it stashes them and starts fresh; on an empty composer it restores the newest stash (Alt+S is an alias). The session picker that Ctrl+S opened up to 1.0.6 moved to F3
  • Typing /workflow and a space now autocompletes saved workflow names plus the manage verbs runs, pause, resume, stop and save, and pause / resume / stop / save list only valid runs
  • MCP servers can now ask for form input or URL consent through the same popup used for questions
  • Downloading a folder that contains only one file now produces a zip that still extracts as a folder
  • Failed tool calls for tools the model invented now clearly state that the tool does not exist
  • The status line refresh timer now uses consistent naming and no longer shows errors on deliberately hidden rows
  • Workflow agent rows now display current context usage instead of cumulative token counts
  • Follow-up messages now send immediately while waiting on a subagent or task, including after using /btw
  • Opening many subagents at once no longer freezes the interface while loading their history
  • Concurrent subagents now start much faster and no longer freeze the parent session
1.0.7 (August 19, 2026)

View official changelog

  • A Workflows tab was added to the extensions modal (Ctrl+L or /plugins), listing installed workflows with name, source and description
  • /workflows changed role: instead of the live dashboard of running workflows it now opens the Workflows catalog tab of saved workflow definitions. The live dashboard moved to /workflow runs
  • Bare /workflow now lists active and recent workflow runs with status and progress instead of printing usage help
  • A Workflows row was added to the Ctrl+P command palette, opening the Workflows catalog tab directly
  • Permission prompts now show Always allow and Never allow as default options, and MCP tools and web-fetch domains additionally offer a Never allow choice that persists per project
  • Status line command scripts can now run on a timer via refresh_interval in config.toml
  • Scheduled background loops can now be deleted directly from the tray
  • Users hitting startup timeouts can now raise the connect budget with an environment variable
  • Tokenless MCP servers no longer incorrectly require authentication in non-interactive sessions, and startup timeouts caused by concurrent auth refreshes across sessions were fixed
  • Repeated identical tool call loops are interrupted earlier, subagents no longer receive the ask-user-question tool, and bare email addresses become clickable mailto links in the pager
1.0.6 (August 18, 2026)

View official changelog

  • Breaking change: spawning a subagent no longer accepts capability_mode — tool access is now controlled only by the agent type
  • With the prompt focused, Shift+arrow keys now extend a text selection like a standard text field, including word, visual-row and logical-line moves, and a selection can be copied or cut with Cmd+C / Cmd+X on Kitty-protocol terminals
  • An optional status line can now sit at the bottom of the full-screen pager. [ui.status_line] shows built-in segments such as model, context usage, cost, directory and git worktree, or the output of any script you point it at (disabled by default)
  • Fixed session startup hangs on large or unhealthy git repositories
  • Queued messages during goals no longer starve, and editing a queued prompt works reliably
  • The first-launch consent notice now shows clickable links and handles keyboard and mouse input correctly
  • Ctrl+C followed by editing a prompt now correctly removes the original text from the conversation
  • Double-clicking a terminal command result now shows the complete output instead of a preview
  • Video generation now surfaces a clear ZDR error instead of raw API responses when output storage is required
  • Project hooks on Windows now correctly expand $CLAUDE_PROJECT_DIR when invoking PowerShell scripts
1.0.5 (August 15, 2026)

View official changelog

  • Worktrees under ~/.grok/worktrees are now cleaned up automatically once they can be judged safe to remove. Before removing one, gc checks for uncommitted, untracked or ignored files and for a commit no surviving ref holds, and it never deletes your last copy of the work (--force does not skip this check)
  • A commit that only a worktree's own reflog names is now moved aside under refs/grok/reclaimed/<worktree>/<commit>, so it can be recovered with git log refs/grok/reclaimed/ and git branch
  • New GROK_FORCE_LOGIN_TEAM_ID restricts interactive login to one or more specific teams
  • ACP clients can now specify the reasoning effort when opening or resuming a session
  • Session titles are regenerated early in the conversation and then pinned, and /resume shows the latest recap along with a summary of the last turn
  • Arabic and Persian text is now ordered correctly in the terminal UI (enable it from /settings)
  • A block from a hook policy now reads "Turn blocked by a hook" instead of the misleading "Turn cancelled by user"
  • The Preparing spinner now shows a readable label such as "Writing file…" or "Writing edit…"
  • Bug fixes: tool calls (shell / grep / list_dir) failing for the rest of a session after /dev/null was deleted, home directory resolution when discovering agent skills on Windows, spinner text for MCP tool calls showing the raw wire name while arguments were still arriving, a crash in grok inspect when a pipe closed early, and truncated streaming replies in Minimal mode when thinking blocks were interleaved
1.0.4 (August 13, 2026)

View official changelog

  • The two memory-enabling flags (--experimental-memory / --no-memory) were removed from the official docs; enabling memory is now GROK_MEMORY=1, [memory] enabled = true, or managed remote settings only. Both entries were dropped from this page
  • New [toolset.web_search] restricts which domains web_search runs against via allowed_domains (up to 5) or excluded_domains, and a configured policy overrides the model's own per-call list
  • GROK_CONFIG / GROK_CONFIG_PATH are now documented as config overlays, letting a harness or ACP client pass settings without writing a config.toml
  • [tools.media_gen] caps parallel media generation within a single model step (defaults: 8 images, 4 videos)
  • A new StopCancelled hook event reports when a turn ends without completing — a user interrupt, a declined permission, the turn limit, and similar
  • New [ui] follow_up_behavior chooses whether a follow-up typed mid-turn waits for the turn to end (queue) or is injected at the next safe gap (steer)
  • /rename --auto is now documented: it unpins a manual title so automatic title generation resumes
  • PreToolUse hooks can now rewrite a tool's input, so a hook can normalize a call instead of only allowing or denying it
  • /session-info supports drag-to-select and copy, and double-click now selects a word while triple-click selects the paragraph
1.0.3 (August 12, 2026)

View official changelog

  • No changes to the command surface: CLI subcommands, flags, slash commands, keyboard shortcuts, and config keys are all unchanged. Both 1.0.2 and 1.0.3 are bug fixes, UI polish, and performance work only (240 items unchanged)
  • Every line of /session-info can now be copied with a click, with a hover affordance and a shortcut to copy the whole thing at once (1.0.3)
  • Starting a subagent is much faster when ~/.grok holds a large number of sessions, and TUI rendering now adapts automatically to high refresh rate displays of 120Hz and above (1.0.3)
  • Startup timeout messages are more useful, showing the slowest step, how long it took, and what to do about it (1.0.2)
  • Fixed large sessions containing images exceeding the compaction limit, and an unrecoverable state after the server rejected an image (1.0.2)
  • Worktree copies no longer inherit dangerous fetch specs or stale shallow grafts, and the privacy banner can now be dismissed after opting out from Settings (1.0.2)
  • Tool calls stay grouped even when hooks attach metadata, with hook results shown in the header, and Cmd+click autolinking no longer misfires in Apple Terminal (1.0.2)
1.0.1 (August 11, 2026)

View official changelog

  • No changes to the command surface: CLI subcommands, flags, slash commands, keyboard shortcuts, and config keys are all unchanged. This release is bug fixes and internal improvements only (240 items unchanged)
  • Session directories are now created with owner-only permissions (a security fix), and native arm64 installation on Apple Silicon was fixed
  • The Esc key now works correctly in cancelled subagent panels, sessions no longer lose their displayed model when the model catalog refreshes, and stripping trailing wildcards from sandbox allow paths was corrected
  • History search threads are now created lazily for faster search, and Automations gained a tool-use card in the UI
Full re-check, August 8, 2026 (Verified August 8, 2026)

View official changelog

  • Fetched all 25 files of the bundled GitHub user guide, extracted every flag and environment variable, and diffed them against this page. 35 items that the official docs document but this page was missing (1 CLI command, 11 flags, 23 settings) were added, taking it from 205 to 240 items
  • Flags added: --prompt-file, --prompt-json, --verbatim, --include-partial-messages, --agent, --agents, --ref / --worktree-ref, --no-alt-screen, --minimal, --fullscreen, and --no-auto-update
  • CLI command added: grok plugin tag, which creates a release tag from the version in plugin.json and pushes it with --push
  • Settings added: the 23 missing entries from the official environment variable list (The key ones), covering auth providers, OIDC, feature toggles (memory, subagents, workflows, web_fetch), the sandbox, logging, and telemetry
  • The subcommand-specific options of grok agent (--agent-profile and --reauth) were folded into the grok agent stdio entry rather than listed separately
1.0.0 (August 7, 2026)

View official changelog

  • Grok Build reached its first major version, 1.0.0. The 0.2.121 recorded at the previous verification never shipped as a public release: the monorepo sync commit of August 7, 2026 (afbc0fb7) rewrote the Cargo.toml version from 0.2.121 to 1.0.0 and replaced changelogs/0.2.121.md and 0.2.121.json with 1.0.0.md and 1.0.0.json. The official changelog web page (x.ai/build/changelog) now reads "Latest v1.0.0 · Aug 7, 2026" with no 0.2.121 entry, so the 0.2.121 entry was removed from this page and replaced with 1.0.0
  • Despite the major version bump there are no breaking changes (every breaking_change field in 1.0.0.json is false) and no commands were removed or renamed. Dashboard rows now show a short summary of the agent's work in the previous turn, and the Extensions modal groups items alphabetically with a collapsible Skills section
  • Grok no longer asks which project directory to use when launched from your home folder or another non-project directory, and a bare /feedback opens a dedicated report pane. Auto theme detection works over SSH and inside tmux, and permission prompts show the complete script with long bash bodies expandable via Ctrl-F
  • A documentation sync in the same release window added a "Checking Disk Usage" section to the user guide (17-sessions.md), documenting grok du (alias grok disk-usage, with --json), which reports disk usage of the grok home (~/.grok) and lists worktrees. It was added to the cli category as grok-du, taking the total from 204 to 205 items. The grok worktree entry's options were also updated with db rebuild, gc --max-age, and rm --dry-run from the same section
  • Numerous bug fixes also landed — MCP tools no longer dropping or corrupting large image output, remote resume behavior, and queued messages no longer being lost — plus performance improvements such as lower memory use when forking large sessions. Note: "Remote resume restores conversation only unless --restore-code is passed" implies a --restore-code flag, which does exist in the repository source, but it is absent from the official documentation (docs.x.ai/build and the bundled user guide), so it was not added this round either
0.2.120 (Verified August 5, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.120 from 0.2.119. The official changelog web page (x.ai/build/changelog) also caught up to 0.2.120 (Aug 3, 2026) — it was still capped at 0.2.117 at the previous verification — and was cross-checked against the bundled crates/codegen/xai-grok-shell/changelogs/0.2.120.md (4 bug fixes) and 0.2.120.json (machine-readable version, content matches the .md)
  • The model picker now updates the status bar and /model menu immediately, even before the first prompt creates a session
  • Background task completion handling was improved (the web changelog describes lower memory use over ACP, while the bundled repo changelog describes the completion message now reporting the full log size and read hint even when only a short prefix was captured; per the dual-source operating rule, the web changelog's wording is used as the primary description)
  • The Changes panel now refreshes after the agent commits on the current branch instead of showing stale unstaged files, and GitHub export on old hibernated sessions now shows a clear message to start a new chat instead of a generic error (both documented only in the bundled repo changelog)
  • All bug fixes only — no commands, flags, or config keys were added or removed (204 items unchanged)
0.2.119 (Verified August 4, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.119 from 0.2.117. The official changelog web page (x.ai/build/changelog) was still capped at 0.2.117 ("Latest v0.2.117 · Jul 30, 2026") at verification time, so the bundled crates/codegen/xai-grok-shell/changelogs/0.2.118.md (3 features, 9 bug fixes), 0.2.119.md (4 features, 6 bug fixes, 2 performance items), and the machine-readable 0.2.119.json (content matches the .md) were used to confirm the changes
  • Sessions can now be permanently deleted from the Agent Dashboard by pressing Ctrl+X twice on an idle row, or from the welcome screen's session list with d then y (0.2.118). Added to the keyboard category as key-dashboard-delete (Ctrl+X Ctrl+X) and key-welcome-delete (d y), 202 to 204 items. The existing /delete, grok dashboard, and /dashboard entries remain valid ways to reach the same functionality via a command
  • The keyboard shortcuts help (Ctrl+.) now also explains how to browse prompt history and search the conversation, and grok doctor now warns when tmux is reducing colors and can fix the config (0.2.118; both extend the existing key-shortcuts-help and grok-doctor entries, so no new data was added)
  • Always-allow for bash commands now lets you edit a free-form glob pattern instead of only word-prefix scopes, and long responses show a clickable arrow that jumps back to the start of the answer (0.2.119)
  • Auto mode now auto-approves more common read-only git commands and harmless file appends, and Plan previews show Mermaid diagram buttons — Open Image, Copy Image Path, Copy Source (0.2.119; none of these add new commands, flags, or config keys)
  • Bug fixes (0.2.118): retrying /btw on temporary model overload, session sharing temporarily disabled, Ctrl+C now cancels instead of no-opping during /compact, automatic recaps no longer appear twice, background task wait timeout descriptions now match the configured ceiling, tasks no longer stay stuck as Running after finishing quickly, the plan mode indicator no longer lingers after approval, dragging the plan preview scrollbar now works, and compaction correctly handles certain context-length errors
  • Bug fixes (0.2.119): gateway connections detect and recover from dead sockets more reliably, question cards let you Tab through answers instead of losing focus, the resume picker no longer tries to load a session from pasted garbage, background task completion messages no longer grow unbounded, the plan viewer scrollbar responds to border-column clicks, and expired external auth provider credentials correctly trigger the sign-in flow
  • Performance (0.2.119): /btw side questions reuse the parent session's cached prefix for faster responses, and Doctor plus tmux-backed startup are faster when no live tmux processes remain
0.2.117 (Verified August 1, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.117. The bundled crates/codegen/xai-grok-shell/changelogs/0.2.117.md and 0.2.117.json match the official changelog web page (x.ai/build/changelog) exactly (1 feature, 5 bug fixes, 1 performance item)
  • Added the GROK_EXTRA_CA_BUNDLE environment variable for supplying additional custom TLS root certificates (0.2.117), now listed under the config category (201 to 202 items). Note that it is so far documented only in the changelog and does not yet appear in the settings catalog (docs.x.ai/build/settings or user guide 05-configuration.md), so its listing there will be rechecked at the next verification
  • Bug fixes (0.2.117): Stop now also terminates background subagents started in a previous turn, kill_task correctly reports non-existent tasks over an ACP connection, and get_task_output returns immediately for tasks that have already completed instead of waiting for a timeout
  • Bug fixes (0.2.117): the /usage command and billing UI are now hidden under enterprise authentication setups, and pressing Enter with no note in revise mode on the plan approval screen no longer starts a build by mistake
  • Performance (0.2.117): resizing the terminal is significantly faster in fullscreen mode with long conversations
0.2.116 (Verified July 31, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.116. The official changelog web page (x.ai/build/changelog) now also lists 0.2.116 (July 30, 2026) as latest, matching the bundled crates/codegen/xai-grok-shell/changelogs/0.2.115.md (6 bug fixes, 1 performance item) and 0.2.116.md (3 features, 4 bug fixes)
  • Added the /undo slash command, which restores files and chat to an earlier turn (0.2.116). It is a full alias of /rewind, so no separate entry was created — the alias is noted on the existing /rewind entry (still 201 items)
  • Headless output with --output-format streaming-json now also includes tool calls, tool results, and usage events (0.2.116). The flag name and its accepted values are unchanged
  • Slash commands are now correctly hidden or refused in minimal and fullscreen mode based on the render modes each command declares support for (0.2.116)
  • Bug fixes (0.2.116): repeated forced re-logins after laptop sleep or network hiccups during token refresh, spurious history load warnings on draft conversations with no server history yet, settings enum pickers not keeping the selected value until you press Enter, and deep-linked settings such as /privacy returning to the list instead of closing on Esc or Enter
  • Bug fixes and performance (0.2.115): chat history corruption that could duplicate tool results or cause later 400 errors after repeated identical tool calls, infinite redirect loops in embedded previews, auth_provider_command not working on Windows, incorrect 'Turn cancelled by user' messages on internal wake turns, and language server crashes (e.g. Roslyn) with missing C# diagnostics. Prompt caching for long conversations was also improved, reducing repeated billing
0.2.114 (Verified July 30, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.114. The official changelog web page (x.ai/build/changelog) still listed 0.2.112 as latest at verification time, so changes were confirmed against the bundled crates/codegen/xai-grok-shell/changelogs/0.2.113.md (4 features, 17 bug fixes, 3 performance items) and 0.2.114.md (1 feature, 1 bug fix)
  • Added grok mcp enable and grok mcp disable for toggling individual MCP servers from the CLI (0.2.113). The on/off state is persisted to your user ~/.grok/config.toml, and only enabling clears a sticky enabled = false in a project definition. Also documented in user guide 07-mcp-servers.md (2 CLI commands added)
  • Added the /delete slash command, which removes the current session's history after a confirmation prompt and returns to the welcome screen (0.2.114). To delete a session you are not in, keep using d then y inside /resume (1 slash command added)
  • The y key now copies the full plan markdown in the plan approval and preview view (0.2.113), so the existing keyboard entry's description was updated (198 → 201 items)
  • Added support for the new SuperGrok Plus subscription tier in authentication and feature gating, and enabled automatic recovery from repetitive loops in model output by default (both 0.2.113, with no new commands)
  • Bug fixes (0.2.113): terminal command output is no longer lost or duplicated when the gateway is unreachable, invalid MCP server entries in config.toml no longer block startup (problems are shown in grok inspect), SessionEnd hooks now run on exit in non-leader TUI and headless sessions, /loop stores prompts that include stop conditions so recurring tasks can terminate themselves, and credentials are no longer lost across multiple grok processes sharing the same auth file
  • Performance (0.2.113): cold start shows the UI instantly while models and settings load in the background, large session forks and resumes use far less memory and avoid spikes, and the workspace daemon no longer exhausts threads on high-core shared machines. 0.2.114 also fixed a startup crash on hosts with no free threads
0.2.112 (Verified July 27, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.112. The official changelog web page (x.ai/build/changelog) still listed 0.2.111 as latest at verification time, so changes were confirmed against the bundled crates/codegen/xai-grok-shell/changelogs/0.2.112.md (1 breaking change, 18 features, 19 bug fixes)
  • Breaking: the CLI version policy now clearly separates soft update floors/ceilings, which never block startup, from hard startup requirements, which do. This is the same minimum_version/maximum_version (soft) vs required_minimum_version/required_maximum_version (hard) split already documented under [cli]
  • Added query_params (appends query parameters to every request URL) and env_http_headers (resolves headers from environment variables) to [model.<name>] for custom model providers, documented in the new 11-custom-models.md guide. Both fields can also be inherited from a shared [model_providers.<id>] block
  • Hooks can now be defined in ~/.grok/config.toml in addition to JSON files. /resume shows only native Grok sessions by default and hints when external sessions are hidden. Marketplace add now rejects non-git URLs at add time instead of failing later
  • grok doctor fix can now repair common tmux clipboard and passthrough problems. The workflows overlay shows live per-agent progress, and failed workflow runs can now be resumed (scratch file limits were also increased)
  • Bug fixes: file attachments now appear correctly when resuming or replaying conversations, background shell commands report their real exit codes, MCP tools appear without restart after a managed service update, and web search now defaults to grok-4.5
  • No CLI commands, flags, slash commands, keyboard shortcuts, or config keys were added or removed (still 198 items). toolOverrides (a date-bound and domain-allowlist wire contract for backend-hosted x_search/web_search) is an internal ACP integration field, undocumented as a config.toml/CLI surface in the official docs, so it is not included in this dataset
0.2.111 (Verified July 25, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.111, and the official changelog (x.ai/build/changelog) now lists it as the latest build
  • Added /tutorial (aliases /tour and /onboarding), which opens the onboarding tutorial: your first prompt, attaching context, navigation, slash commands, worktrees, plan mode, customization, and switching from another agent tool, each about a 30-second read
  • Added /resume-claude, /resume-codex, and /resume-cursor, the bundled skills that continue a recent session from those tools inside Grok Build (confirmed in the new docs/tutorial directory and in the foreign_sessions.rs source)
  • -r, --resume now resumes by session title as well as by ID, matching titles for the current directory while ignoring letter case, with UUID-shaped values always treated as IDs. The value name changed from ID to ID_OR_TITLE
  • Added --leader / --no-leader as an agent option shared by every grok agent transport, switching between connecting to a shared leader process and forcing a local-only agent process
  • Added version pinning to [cli] (minimum_version, maximum_version, required_minimum_version, required_maximum_version). minimum_version is now a soft updater floor that no longer blocks startup; the required_ keys are the hard bounds that refuse startup
  • Added [shell_environment_policy] to sandbox.toml, controlling which environment variables a subprocess inherits via inherit, ignore_default_excludes, exclude, include_only, and set, so shell secrets cannot leak into tool execution
  • Image generation and video generation tools (and their slash commands) can now be disabled via config or environment variables. /session-info shows whether the session uses OAuth or an API key, and grok doctor fix can be run from inside the TUI
  • Plugin subagents now inherit the parent session's connected MCP servers by default, !cmd commands allow up to one hour before timing out, a single Esc cancels the current turn, and Grok automatically stops a turn that keeps repeating the same tool call (191 → 198 items)
0.2.110 (Verified July 23, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.110. Removing MCP servers, plugins, or hook sources in the Extensions modal now asks for confirmation, and session creation failures (including disk full) show an error message instead of hanging
  • Added the standalone grok doctor CLI subcommand (--json flag and fix subcommand), confirmed present in both the bundled GitHub user guide and the source (doctor_cmd/mod.rs, app/cli.rs) — it had been documented as a fallback for when the TUI won't start but was missing from this page (190 → 191 items)
  • Updated the /doctor and /session-info descriptions and the Esc key behavior (in the default mode, Esc now cancels the running turn immediately and preserves the draft; only fullscreen vim scrollback mode keeps the old no-op behavior) to match the latest documentation
  • The official build-by-build changelog (x.ai/build/changelog) documents through 0.2.106 as of verification; per-version notes for 0.2.107–0.2.110 were confirmed from the repository's bundled changelogs directory
0.2.109 (Verified July 22, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.109. Versions 0.2.107–0.2.109 are patch releases not yet documented in x.ai/build/changelog, with no major changes to the CLI command, flag, or config-key surface
  • A re-check against the bundled GitHub user guide (04-slash-commands.md) added five previously-missing slash commands — /deep-research, /doctor, /edit-prompt, /workflow, and /workflows — to the slash category (185 → 190 items)
  • The official build-by-build changelog (x.ai/build/changelog) documents through 0.2.106 as of verification; per-version notes for 0.2.107 onward were not yet published, so the version number is synced to the source-of-truth Cargo.toml
0.2.106 (Verified July 20, 2026)

View official changelog

  • The source repository (xai-org/grok-build) Cargo.toml reached 0.2.106. Versions 0.2.102–0.2.106 are patch releases with no changes to the CLI command, flag, slash-command, or config-key surface
  • Full re-audit of every category against the official docs (docs.x.ai/build) and the bundled GitHub user guide expanded the catalogue from 108 to 185 items: 35 slash commands (/quit, /copy, /imagine, and more), 11 CLI subcommands (grok export, grok worktree, and more), 4 flags (--fork-session and more), 20 keyboard shortcuts (scrollback navigation and more), and 7 config sections ([ui], [features], and more)
  • The official build-by-build changelog (x.ai/build/changelog) documents through 0.2.101 as of verification; per-version notes for 0.2.102 onward were not yet published, so the version number is synced to the source-of-truth Cargo.toml
Open-source release (July 15, 2026)

View official changelog

  • Full Rust source of the grok CLI/TUI and agent runtime published on GitHub (xai-org/grok-build) under Apache License 2.0
  • Covers the agent loop, tool implementations, terminal UI (plan review, inline diff viewer), and the extension system (skills, plugins, hooks, MCP servers, subagents)
  • Enables fully local-first operation: build from source and point it at your own local inference via config.toml
  • Repository is a periodically-synced, read-only mirror of the internal monorepo; external contributions are not accepted per CONTRIBUTING.md
0.2.101 (July 13, 2026)

View official changelog

  • grok inspect now shows effective compatibility settings for Cursor, Claude, and Codex sessions
  • Session picker discovers and resumes recent Claude Code, Codex, and Cursor sessions
  • New 'Match display refresh rate' setting for high-refresh displays
  • Auth method (API key vs OIDC) can now be pinned in config.toml, disabling automatic fallback
  • Headless JSON output now includes token usage and cost per prompt/session
Early beta (0.1.220) (May 25, 2026)

View official changelog

  • Public early-beta launch for all SuperGrok and X Premium Plus subscribers via a single-command installer
  • Plan mode: approve, comment on, or rewrite a plan before execution; approved changes render as a reviewable diff
  • Reads AGENTS.md, plugins, hooks, skills, and MCP servers automatically on start
  • Parallel subagents for larger tasks, including dedicated git worktrees per subagent
  • Headless mode via -p for scripts/CI; full ACP (Agent Client Protocol) support

About the Grok Build Cheat Sheet

The Grok Build Cheat Sheet lets you search and one-click copy the commands, flags, slash commands, keyboard shortcuts, configuration, and workflows of xAI's official AI coding CLI (Grok Build, binary name grok), grouped by category. The data is verified against the official documentation (docs.x.ai/build) and the official repository (github.com/xai-org/grok-build).

Key features

  • Search across CLI commands, flags, slash commands, keyboard shortcuts, config, and workflows
  • Filter by category to reach the right information fast
  • One-click copy any command to paste into your terminal
  • Includes Grok Build-specific concepts like --yolo, Plan mode, and subagents
  • Follows the official docs, with version history and source links

When it helps

  • When you're getting an overview of Grok Build's commands for the first time
  • When you need to quickly check flags and modes like --yolo or Plan mode
  • When you want to recall slash commands or keyboard shortcuts
  • When building headless or CI-integrated workflows

Frequently asked questions

How is Grok Build different from the community grok-cli project?

The 'Grok Build' covered on this page (binary name grok) is xAI's official AI coding CLI, distributed at github.com/xai-org/grok-build. Community projects with similar names, such as superagent-ai/grok-cli, are separate projects not officially supported by xAI. Check the repository URL and the official installer (x.ai/cli/install.sh) to confirm you're using the official version.

What is Plan mode?

Plan mode has Grok propose a plan you can approve, comment on, or rewrite before it executes; approved changes render as a reviewable diff. In the interactive TUI, cycle through Normal -> Plan -> Always-approve with Shift+Tab (or enter Plan mode directly with /plan). On the command line, use --no-plan to disable Plan mode for that session.

How do I run autonomously without confirmations?

Add --yolo to auto-approve all tool executions for unattended runs (explicit --deny rules and PreToolUse hooks still apply). In the interactive TUI, toggle always-approve mode with Ctrl+O or /always-approve. When destructive operations are involved, consider scoping the run with --sandbox or --allow/--deny.

Which version is listed here?

This targets Grok Build 1.0.16 — the version pinned in the source repository's Cargo.toml (the single source of truth) — verified against the official documentation (docs.x.ai/build) and the official repository (github.com/xai-org/grok-build). 1.0.16 added or removed no commands, flags, shortcuts or config keys, so this page stays at 250 items; the [models] entry description was extended to cover restricting selectable models through a signed requirements.toml. For per-version changes, see the update history at the bottom of the page.

How do I install Grok Build?

Install with the official installer (curl -fsSL https://x.ai/cli/install.sh | sh; install.ps1 on Windows), then authenticate via a browser at grok.com on first launch. Update anytime with grok update.