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 useCollapse how to use
- 1
Search commands
Type a keyword to filter across command names, flags, descriptions, and examples at once.
- 2
Filter by category
Switch between CLI commands, flags, slash commands, keyboard shortcuts, config, and workflows to reach what you need fast.
- 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
CLI Commands
grok
Examples
grokStart a new interactive sessiongrok "<prompt>"
Examples
grok "fix the failing auth test and run it"Start the TUI with an initial taskgrok update
Notes
- --check: only check for updates
- --version V: install a specific version
- --alpha / --stable: choose the update channel
grok version
Notes
- Alias: grok --version
grok login
Notes
- --oauth: sign in via browser OAuth (default, flag optional)
- --device-auth (alias --device-code): device-code flow for headless/remote environments
grok logout
grok models
grok inspect
Notes
- --json: machine-readable report
grok doctor
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 doctorShow a diagnostic report for the current shell environmentgrok doctor fixList available automatic fixesgrok mcp list
Notes
- --json: machine-readable output
grok mcp add
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/dirAdd a local stdio MCP servergrok mcp add --transport http sentry https://mcp.sentry.dev/mcpAdd a remote HTTP MCP servergrok mcp remove <name>
Notes
- --scope <user|project>
grok mcp doctor [<name>]
Notes
- --json: machine-readable output
grok mcp enable <name>
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 githubEnable a local/TOML (or compat-sourced) MCP servergrok mcp disable <name>
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 githubTemporarily disable an MCP server while keeping its configgrok plugin list
Notes
- --json
- --available (requires --json): also list plugins available but not installed
grok plugin install <source>
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 --trustInstall and trust a plugin from GitHubgrok plugin uninstall <name>
Notes
- --confirm
- --keep-data: preserve the plugin's data directory
grok plugin update [<name>]
grok plugin enable <name>
grok plugin disable <name>
grok plugin details <name>
grok plugin validate [<path>]
grok plugin tag [<path>] [--push]
Notes
- --push: push the created tag to the remote
Examples
grok plugin tagTag the release using the version in plugin.jsongrok plugin tag --pushCreate the tag and push it to the remotegrok sessions list
Notes
- --limit <N>: default 20
grok sessions search <keyword>
grok sessions delete <id>
grok export <session-id> [output]
grok import [targets...]
grok worktree <list|show|rm|gc|db>
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 listList session worktreesgrok worktree gcClean up worktrees that are no longer neededgrok memory clear
Notes
- --workspace: clear workspace memory (default)
- --global: clear the global MEMORY.md
- --all / --yes
grok dashboard
grok agent stdio
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 stdioStart an ACP stdio servergrok wrap <command...>
Examples
grok wrap ssh user@hostForward copies from the SSH host to your local clipboardgrok completions <shell>
Examples
grok completions zshGenerate the completion script for zshgrok setup
grok du
Notes
- --json: emit the same report as machine-readable output (includes fields such as volume_capacity_bytes, registry, and created_at)
Examples
grok duShow grok home disk usage and the worktree listgrok du --jsonEmit the disk usage report as JSONgrok clone <url> [dir]
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/repoFetch the repository depth-1 and mount the working treegrok clone https://github.com/example/repo --full-historyFetch with complete history, tags and every branchgrok usage <session-id> [turn]
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 turngrok usage <session-id> 3Show only the third turn in the same envelopeCLI Flags
-p, --single <PROMPT>
Examples
grok -p "Explain this codebase"Run a headless one-shot prompt-m, --model <MODEL>
-s, --session-id <ID>
-r, --resume <ID_OR_TITLE>
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
--fork-session
--cwd <PATH>
--output-format <FMT>
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
Notes
- --yolo is an alias of --always-approve
--rules <TEXT>
Notes
- Alias: --append-system-prompt
Examples
grok --rules "Always use TypeScript. Prefer functional components."Add per-session rules--system-prompt-override
Notes
- Alias: --system-prompt
--tools <TOOLS>
Examples
grok -p "Explain this codebase" --tools "read_file,grep,list_dir"Restrict to read-only tools--disallowed-tools <TOOLS>
Examples
grok -p "Fix this bug" --disallowed-tools "Agent"Prevent any subagent spawning--max-turns <N>
--reasoning-effort, --effort <LEVEL>
Notes
- Canonical levels: none, minimal, low, medium, high, xhigh, max (alias of xhigh)
--permission-mode <MODE>
Notes
- Only bypassPermissions and default take effect via this flag; other values must be set via defaultMode in config
--allow <RULE>
Examples
grok -p "Set up the project" --allow "Bash(npm*)"Allow npm-prefixed commands--deny <RULE>
Examples
grok -p "Clean up this project" --deny "Bash(rm*)"Block rm-prefixed commands--sandbox <PROFILE>
Notes
- Built-in: off (default), workspace, devbox, read-only, strict; or a custom profile name from sandbox.toml
Examples
grok --sandbox workspaceRead everywhere, write only to CWD + ~/.grok/ + temp dirs--no-plan
--no-subagents
--disable-web-search
-w, --worktree [NAME]
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>
--json-schema
--oauth
--leader, --no-leader
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 stdioStart the stdio transport with a local agent process instead of a shared leader--prompt-file <PATH>
Examples
grok -p --prompt-file ./task.mdRun with the contents of task.md as the prompt--prompt-json <JSON>
Examples
grok -p --prompt-json '[{"type":"text","text":"Review this diff"}]'Pass the prompt as content blocks--verbatim
Examples
grok -p "$RAW" --verbatimSend the input as the prompt without changes--include-partial-messages
Examples
grok -p "..." --output-format streaming-messages-json --include-partial-messagesStream output including the raw events--agent <NAME>
Examples
grok -p "..." --agent reviewerRun with the reviewer agent--agents <JSON>
Examples
grok -p "..." --agents '{"reviewer":{"model":"grok-build"}}'Pass subagent definitions inline--ref, --worktree-ref <REF>
Notes
- Alias: --ref
Examples
grok --worktree feature --worktree-ref mainStart in a worktree based on main--no-alt-screen
Examples
grok --no-alt-screenStart with inline rendering--minimal
Examples
grok --minimalStart in minimal mode--fullscreen
Examples
grok --fullscreenStart in fullscreen mode--no-auto-update
Examples
grok -p "..." --no-auto-updateRun without checking for updatesSlash Commands
/new
Notes
- Alias: /clear
/resume
/quit
Notes
- Alias: /exit
/home
Notes
- Alias: /welcome
/delete
Notes
- To delete a session you are not in, open /resume and press d then y
/help
/rename <title|--auto>
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
/session-info
/compact [context]
/context
/fork [--worktree|--no-worktree] [directive]
/rewind
Notes
- Alias: /undo
/copy [N]
Examples
/copy 2Copy the second-latest response/copy out.txtWrite to a file instead of the clipboard (useful over SSH)/export
/find
/transcript
/model <name> [effort]
Notes
- Alias: /m
Examples
/model Reasoning X highSwitch model and set effort in one command/effort <level>
Notes
- Levels: low, medium, high, xhigh
/always-approve
/auto
/plan [description]
/view-plan
Notes
- Aliases: /show-plan, /plan-view
/multiline
Notes
- Alias: /ml
/history
/compact-mode
/vim-mode
/minimal
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
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
/memory [on|off]
Notes
- Alias: /mem
- Requires memory enabled via GROK_MEMORY=1, [memory] enabled = true, or managed remote settings
/flush
Notes
- Requires memory enabled via GROK_MEMORY=1, [memory] enabled = true, or managed remote settings
/dream
Notes
- Requires memory enabled via GROK_MEMORY=1, [memory] enabled = true, or managed remote settings
/remember <text>
/hooks
/plugins
/marketplace
/skills
/mcps
/imagine <prompt>
Examples
/imagine a golden sunset over a calm oceanGenerate an image from text/imagine-video <prompt>
/loop [interval] <prompt>
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 failuresPeriodic test check/tasks
/queue
/goal <objective|status|pause|resume|clear>
/btw <question>
Examples
/btw also check the error handlingAsk a side question without stopping the running task/dashboard
Notes
- Aliases: /agents-dashboard, /sessions
/theme [name]
Notes
- Alias: /t
Examples
/theme tokyonightSwitch directly to a named theme/docs [web|<title>]
Notes
- Aliases: /howto, /guides
/settings
Notes
- Aliases: /config, /preferences, /prefs
/config-agents
Notes
- Alias: /agents
/personas
/import-claude
/terminal-setup
Notes
- Aliases: /terminal-check, /terminal-info
/feedback [message]
/release-notes
Notes
- Alias: /changelog
/usage
/privacy
Examples
/privacy opt-outOpt out of data retention/login
/logout
/deep-research <query>
Examples
/deep-research Compare the migration risks of PostgreSQL 17 and MySQL 9Generate a verified research report on the given topic/workflow [<name>|runs|pause|resume|stop|save]
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-changesLaunch a saved workflow/workflow runsOpen the live run dashboard/workflow pause review-changesPause a running workflow/workflows
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
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
Notes
- fix: list available automatic fixes
/tutorial
Notes
- Aliases: /tour, /onboarding
- Pick a topic to open it, then flow straight on to the next one
/resume-claude
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
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
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
Configuration
~/.grok/config.toml
Notes
- Precedence: CLI flags > env vars > config.toml > managed/requirements config > built-in defaults
.grok/config.toml (project-scoped)
Notes
- Discovered at every directory level from repo root to cwd; deepest/cwd file wins for mcp_servers/plugins
~/.grok/pager.toml
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 / ...
[model.<name>]
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 / ...
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
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
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 / ...
[session] auto_compact_threshold_percent / load_envrc
[tools] respect_gitignore / [tools.media_gen]
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]
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]
[mcp_servers.<name>]
Notes
- stdio: command, args, env, enabled, startup_timeout_sec, tool_timeout_sec
- HTTP/SSE: url, headers
[permission] rules / allow / deny / ask
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>]
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
[plugins] paths / disabled / enabled
[subagents] enabled / toggle / 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]
[compat.cursor] / [compat.claude] / [compat.codex]
[telemetry] events_url / otel_enabled / ...
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
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 grokTemporarily tighten the minimum version allowed to start, via an environment override[shell_environment_policy] inherit / ignore_default_excludes / exclude / include_only / set
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
Notes
- Deeper directories take precedence. Global: ~/.grok/AGENTS.md
XAI_API_KEY
Notes
- Also accepted: GROK_CODE_XAI_API_KEY (backward compatibility)
Examples
export XAI_API_KEY="xai-..."Authenticate for CI/CDGROK_HOME
GROK_CONFIG / GROK_CONFIG_PATH
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 stdioStart the ACP agent with the default reasoning effort set to highGROK_EXTRA_CA_BUNDLE
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 addedGROK_AUTH_PROVIDER_COMMAND
GROK_AUTH_PROVIDER_LABEL
GROK_AUTH_TOKEN_TTL
GROK_AUTH_EARLY_INVALIDATION_SECS
GROK_OIDC_ISSUER
GROK_OIDC_CLIENT_ID
GROK_CLI_CHAT_PROXY_BASE_URL
GROK_MEMORY
GROK_SUBAGENTS
GROK_WORKFLOWS
GROK_WEB_FETCH
GROK_WEB_FETCH_ALLOW_LOCAL
GROK_AGENT
GROK_SANDBOX
GROK_EXIT_TIMEOUT_SECS
GROK_LOG_FILE
RUST_LOG
GROK_RESPECT_GITIGNORE
GROK_TELEMETRY_ENABLED
GROK_TELEMETRY_TRACE_UPLOAD
GROK_TELEMETRY_MIXPANEL_ENABLED
GROK_EXTERNAL_OTEL
GROK_FEEDBACK_ENABLED
GROK_DEPLOYMENT_KEY
GROK_DEFAULT_SELECTED_PERMISSION
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 grokStart with the reject row preselected on approval prompts, without touching config.tomlWorkflows
grok -p "Review changes..." --output-format json --yolo | jq -r '.text' > review.md
grok -p "Review staged changes..." --yolo --output-format json | jq -r '.text' | grep -q "^OK" || exit 1
grok -p "Review the PR" --output-format json | jq -r '.sessionId'
Examples
grok -p "Now check for security issues" --resume "<id>"Continue in the captured sessiongrok -p "..." --allow "Bash(git *)" --allow "Bash(gh *)"
grok plugin marketplace add my-org/team-plugins
Examples
grok plugin marketplace listList plugins available from registered marketplacesgrok plugin install my-org/team-plugins --trustInstall and trust a plugin from the marketplacefor file in src/*.js; do grok -p "Migrate $file to ES modules." --yolo; done
Version history
The Grok Build versions and key changes used to verify the data on this page.
- 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
- 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
- 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
- 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
- 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
- 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
- grok clone now reuses matching local checkouts as linked worktrees, making session creation faster
- 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
- 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
- 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
- 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
- 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
- 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
- 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)
- 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
- 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
- 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
- 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)
- 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
- 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
- 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
- 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
- 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
- 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)
- 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
- 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
- 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
- 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
- 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
- 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.