Grok WorldGrok Build CLI field station

GROK BUILD / CLI 知識庫

Grok Build CLI 完整參考

收錄遞迴 help 中每一條公開 shell 路徑,並清楚區分官方文件與 source-preview。可直接用瀏覽器搜尋;所有列都由共享 provider manifest 產生。

CHANNEL1.0.0 / 完整 / 可追溯
來源核對日期2026-07-31
ORIGINOFFICIAL DOCS / PRIMARY

證據邊界

Grok Build 1.0.0

已安裝版本的遞迴 help 是 release shell 路徑的權威。官方文件補充設定與行為;無法綁定版本的 source HEAD 一律只標示為 preview。

擷取版本
1.0.0 / darwin-arm64
來源政策
Installed Grok Build 1.0.0 recursive help is authoritative for released command paths and public options.
清單遙測
62
Shell 指令
359
選項
66
TUI 斜線指令
136
設定結構
67
環境變數名稱
63 runtime 已確認 237 文件已確認 31 source 預覽 0 條件式 0 歷史

RELEASE / DOCS / SOURCE

已知差異

docs-ahead

docs import ahead

Official docs list grok import, but installed 1.0.0 root help does not expose it; treat it as conditional, not release-confirmed.

grok-runtime-1.0.0 · grok-docs-cli-2026-07-31
runtime-ahead

concise docs

The official CLI page intentionally lists common commands only; release help additionally exposes leader, doctor fix, MCP toggles, plugin tag, trace, and worktree database commands.

grok-runtime-1.0.0 · grok-docs-cli-2026-07-31
source-ahead

source unbound

Public source HEAD and SOURCE_REV cannot be bound to installed 1.0.0, so source-only TUI and command surfaces remain preview evidence.

grok-runtime-1.0.0 · grok-source-cli-500129c · grok-source-tui-500129c
docs-ahead

hidden options excluded

The hidden root-level --no-auto-update flag is intentionally excluded because 1.0.0 root --help does not expose it; the distinct public agent leader flag remains in the runtime inventory.

grok-runtime-1.0.0 · grok-docs-cli-2026-07-31

01 / SHELL TREE

Shell 指令

62 Shell 指令 / 22 個指令群組 / 359 選項

01 root 1 Shell 指令
grok
runtime 已確認 唯讀

Launch the Grok Build TUI, run one prompt, or select a subcommand.

grok [OPTIONS] [PROMPT] [COMMAND]
grok / 選項
選項型態可用性風險Summary
--agent NAME string runtime 已確認 唯讀 Select an agent name or agent definition file.
--agents JSON string runtime 已確認 需檢視 Provide inline subagent definitions as JSON.
--allow, --allowedTools RULE string runtime 已確認 高影響 Add an explicit permission allow rule for this invocation.
--always-approve, --yolo, --dangerously-skip-permissions boolean runtime 已確認 高影響 Auto-approve tool executions; deny rules, hooks, and the sandbox remain separate controls.
-c, --continue boolean runtime 已確認 唯讀 Continue the most recent session for the current working directory.
--cwd CWD path runtime 已確認 唯讀 Set the working directory.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
--deny, --disallowedTools RULE string runtime 已確認 需檢視 Add an explicit permission deny rule for this invocation.
--disable-web-search boolean runtime 已確認 唯讀 Disable web search and web fetch tools.
--disallowed-tools TOOLS array runtime 已確認 唯讀 Remove comma-separated built-in tools.
--experimental-memory boolean runtime 已確認 需檢視 Enable cross-session memory.
--fork-session boolean runtime 已確認 唯讀 Create a new session ID when resuming or continuing.
--fullscreen boolean runtime 已確認 唯讀 Use the standard fullscreen TUI for this session.
-h, --help boolean runtime 已確認 唯讀 Print root help.
--include-partial-messages boolean runtime 已確認 唯讀 Emit incremental stream_event lines alongside whole messages when using streaming-messages-json output.
--json-schema SCHEMA string runtime 已確認 唯讀 Constrain the response to a JSON Schema and imply JSON output.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
-m, --model MODEL string runtime 已確認 唯讀 Select a model ID.
--max-turns N integer runtime 已確認 唯讀 Limit the number of agent turns.
--minimal boolean runtime 已確認 唯讀 Use experimental scrollback-native rendering for this session.
--no-alt-screen boolean runtime 已確認 唯讀 Run inline without the terminal alternate screen.
--no-memory boolean runtime 已確認 唯讀 Disable cross-session memory for this session.
--no-plan boolean runtime 已確認 唯讀 Disable plan mode.
--no-subagents boolean runtime 已確認 唯讀 Disable subagent spawning.
--oauth boolean runtime 已確認 需檢視 Use OAuth when the welcome screen starts authentication.
--output-format OUTPUT_FORMAT enum: plain | json | streaming-json | streaming-messages-json runtime 已確認 唯讀 Select the headless output format.
-p, --single PROMPT string runtime 已確認 需檢視 Run a single-turn prompt, print the response, and exit.
--permission-mode MODE enum: default | acceptEdits | auto | dontAsk | bypassPermissions | plan runtime 已確認 高影響 Select the invocation permission mode.
--prompt-file PATH path runtime 已確認 需檢視 Read a single-turn prompt from a file.
--prompt-json JSON string runtime 已確認 需檢視 Provide a single-turn prompt as JSON content blocks.
-r, --resume SESSION_ID_OR_TITLE string runtime 已確認 唯讀 Resume a session by ID or title, or the most recent session when omitted.
--reasoning-effort, --effort EFFORT enum: low | medium | high runtime 已確認 唯讀 Select reasoning effort for a supported model.
--restore-code boolean runtime 已確認 高影響 Check out the original session commit while resuming.
--rules, --append-system-prompt RULES string runtime 已確認 需檢視 Append extra rules to the system prompt.
-s, --session-id SESSION_ID string runtime 已確認 唯讀 Use a specific UUID for a new conversation or a named fork.
--sandbox PROFILE enum: off | workspace | devbox | read-only | strict runtime 已確認 需檢視 Select a filesystem and network sandbox profile.
--system-prompt-override, --system-prompt PROMPT string runtime 已確認 高影響 Replace the system prompt for this invocation.
--tools TOOLS array runtime 已確認 需檢視 Select comma-separated built-in tools.
-v, --version boolean runtime 已確認 唯讀 Print the release version.
--verbatim boolean runtime 已確認 唯讀 Send the prompt exactly as supplied.
-w, --worktree WORKTREE string runtime 已確認 需檢視 Start the session in a new git worktree, optionally named.
--worktree-ref, --ref WORKTREE_REF string runtime 已確認 需檢視 Choose the branch, tag, or commit used to create a worktree.
範例
grok
grok -p "Explain this repository"
grok -p "List TODOs" --output-format json
grok-runtime-1.0.0
02 help 1 Shell 指令
grok help
runtime 已確認 唯讀

Print root or nested command help.

grok help [COMMAND]...

沒有此指令專用的公開選項。

範例
grok help mcp add
grok-runtime-1.0.0
03 agent 5 Shell 指令
grok agent
runtime 已確認 需檢視

Run Grok without the interactive TUI.

grok agent [OPTIONS] [COMMAND]
grok agent / 選項
選項型態可用性風險Summary
--reauth, --reauthenticate boolean runtime 已確認 需檢視 Authenticate before starting the agent.
-m, --model MODEL string runtime 已確認 唯讀 Select a model ID.
--reasoning-effort, --effort EFFORT enum: low | medium | high runtime 已確認 唯讀 Select reasoning effort.
--always-approve boolean runtime 已確認 高影響 Auto-approve tool executions.
--agent-profile PATH path runtime 已確認 需檢視 Load an agent profile file.
--plugin-dir DIR path runtime 已確認 高影響 Load a highest-priority, automatically trusted plugin directory for this process.
--leader boolean runtime 已確認 需檢視 Connect to a shared leader process.
--no-leader boolean runtime 已確認 唯讀 Start a separate agent even when leader mode is configured.
--grok-ws-origin GROK_WS_ORIGIN url runtime 已確認 需檢視 Override the Grok relay origin.
--grok-ws-url GROK_WS_URL url runtime 已確認 需檢視 Override the Grok relay WebSocket URL.
--cli-chat-proxy-base-url URL url runtime 已確認 需檢視 Override the CLI chat proxy URL.
--xai-api-base-url URL url runtime 已確認 需檢視 Override the public xAI API base URL.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok agent stdio
grok-runtime-1.0.0
grok agent stdio
runtime 已確認 需檢視

Run Grok as an ACP agent over standard input and output.

grok agent stdio [OPTIONS]
grok agent stdio / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok agent stdio
grok-runtime-1.0.0
grok agent headless
runtime 已確認 需檢視

Run the agent headlessly over the Grok WebSocket relay.

grok agent headless [OPTIONS]
grok agent headless / 選項
選項型態可用性風險Summary
--grok-ws-origin GROK_WS_ORIGIN url runtime 已確認 需檢視 Override the relay origin.
--grok-ws-url GROK_WS_URL url runtime 已確認 需檢視 Override the relay WebSocket URL.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok agent serve
runtime 已確認 高影響

Run the agent as a WebSocket server.

grok agent serve [OPTIONS]
grok agent serve / 選項
選項型態可用性風險Summary
--bind BIND string runtime 已確認 需檢視 Select the server listen address.
--secret SECRET string runtime 已確認 高影響 Set the client-authentication secret; omit it to auto-generate one.
--remote REMOTE url runtime 已確認 高影響 Select a remote agent URL for proxy mode.
--grok-ws-origin GROK_WS_ORIGIN url runtime 已確認 需檢視 Override the relay origin.
--grok-ws-url GROK_WS_URL url runtime 已確認 需檢視 Override the relay WebSocket URL.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok agent leader
runtime 已確認 需檢視

Run the shared leader process used by other clients.

grok agent leader [OPTIONS]
grok agent leader / 選項
選項型態可用性風險Summary
--no-exit-on-disconnect boolean runtime 已確認 唯讀 Keep the leader running after the last client disconnects.
--relay-on-demand boolean runtime 已確認 需檢視 Connect the relay only when a headless IPC client requires it.
--no-auto-update boolean runtime 已確認 唯讀 Disable periodic update checks for the leader.
--grok-ws-origin GROK_WS_ORIGIN url runtime 已確認 需檢視 Override the relay origin.
--grok-ws-url GROK_WS_URL url runtime 已確認 需檢視 Override the relay WebSocket URL.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
04 completions 1 Shell 指令
grok completions
runtime 已確認 唯讀

Generate a shell completion script.

grok completions [OPTIONS] <SHELL>
grok completions / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok completions zsh
grok-runtime-1.0.0
05 dashboard 1 Shell 指令
grok dashboard
runtime 已確認 唯讀

Open the Agent Dashboard at startup.

grok dashboard [OPTIONS]
grok dashboard / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
06 doctor 2 Shell 指令
grok doctor
runtime 已確認 唯讀

Check terminal, clipboard, color, input, notification, and sandbox support.

grok doctor [OPTIONS]
grok doctor / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 唯讀 Emit machine-readable diagnostics.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok doctor --json
grok-runtime-1.0.0
grok doctor fix
runtime 已確認 需檢視

Apply available automatic terminal fixes.

grok doctor fix [OPTIONS]
grok doctor fix / 選項
選項型態可用性風險Summary
--yes boolean runtime 已確認 高影響 Apply fixes without confirmation.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok doctor fix
grok doctor fix --yes
grok-runtime-1.0.0
07 export 1 Shell 指令
grok export
runtime 已確認 需檢視

Export a session transcript as Markdown.

grok export [OPTIONS] <SESSION_ID> [OUTPUT]
grok export / 選項
選項型態可用性風險Summary
-c, --clipboard boolean runtime 已確認 需檢視 Copy the exported transcript to the clipboard.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
08 inspect 1 Shell 指令
grok inspect
runtime 已確認 需檢視

Show configuration, rules, skills, plugins, hooks, and MCP servers discovered for the directory.

grok inspect [OPTIONS]
grok inspect / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 需檢視 Emit the discovered configuration as JSON; review before sharing.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok inspect
grok inspect --json
grok-runtime-1.0.0
09 leader 4 Shell 指令
grok leader
runtime 已確認 需檢視

Manage running leader processes.

grok leader [OPTIONS] <COMMAND>
grok leader / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok leader list
runtime 已確認 唯讀

List discovered leader processes.

grok leader list [OPTIONS]
grok leader list / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 唯讀 Emit JSON.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok leader info
runtime 已確認 唯讀

Show information about one leader process.

grok leader info [OPTIONS]
grok leader info / 選項
選項型態可用性風險Summary
--pid PID integer runtime 已確認 唯讀 Select a leader by process ID.
--json boolean runtime 已確認 唯讀 Emit JSON.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok leader kill
runtime 已確認 高影響

Stop a running leader process.

grok leader kill [OPTIONS]
grok leader kill / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
10 login 1 Shell 指令
grok login
runtime 已確認 需檢視

Sign in to Grok Build.

grok login [OPTIONS]
grok login / 選項
選項型態可用性風險Summary
--oauth boolean runtime 已確認 需檢視 Use browser OAuth.
--device-auth boolean runtime 已確認 需檢視 Use device-code authentication for remote or headless terminals.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok login
grok login --device-auth
grok-runtime-1.0.0
11 logout 1 Shell 指令
grok logout
runtime 已確認 高影響

Sign out and clear cached credentials.

grok logout [OPTIONS]
grok logout / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
12 mcp 7 Shell 指令
grok mcp
runtime 已確認 需檢視

Manage MCP server configurations.

grok mcp [OPTIONS] <COMMAND>
grok mcp / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok mcp list
runtime 已確認 唯讀

List configured MCP servers.

grok mcp list [OPTIONS]
grok mcp list / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 唯讀 Emit JSON.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok mcp list --json
grok-runtime-1.0.0
grok mcp add
runtime 已確認 高影響

Add or replace a user- or project-scoped MCP server.

grok mcp add [OPTIONS] <NAME> [COMMAND_OR_URL] [ARGS]...
grok mcp add / 選項
選項型態可用性風險Summary
-t, --transport TRANSPORT enum: stdio | http | sse runtime 已確認 唯讀 Select stdio, streamable HTTP, or SSE transport.
-s, --scope SCOPE enum: user | project runtime 已確認 需檢視 Write to user or project configuration.
-e, --env KEY=value string runtime 已確認 高影響 Add a process environment entry; avoid literal secret values.
-H, --header NAME: VALUE string runtime 已確認 高影響 Add an HTTP header; prefer environment-backed configuration for secrets.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir
grok mcp add --transport http docs https://example.invalid/mcp
grok-runtime-1.0.0
grok mcp remove
runtime 已確認 高影響

Remove an MCP server from one configuration scope.

grok mcp remove [OPTIONS] <NAME>
grok mcp remove / 選項
選項型態可用性風險Summary
-s, --scope SCOPE enum: user | project runtime 已確認 需檢視 Select the configuration scope.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok mcp enable
runtime 已確認 需檢視

Enable a configured MCP server.

grok mcp enable [OPTIONS] <NAME>
grok mcp enable / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok mcp disable
runtime 已確認 需檢視

Disable a configured MCP server.

grok mcp disable [OPTIONS] <NAME>
grok mcp disable / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok mcp doctor
runtime 已確認 唯讀

Diagnose MCP configuration and connectivity.

grok mcp doctor [OPTIONS] [NAME]
grok mcp doctor / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 唯讀 Emit JSON diagnostics.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok mcp doctor --json
grok-runtime-1.0.0
13 memory 2 Shell 指令
grok memory
runtime 已確認 需檢視

Manage cross-session memory.

grok memory [OPTIONS] <COMMAND>
grok memory / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok memory clear
runtime 已確認 高影響

Delete workspace, global, or all memory files.

grok memory clear [OPTIONS]
grok memory clear / 選項
選項型態可用性風險Summary
--workspace boolean runtime 已確認 高影響 Clear workspace memory.
--global boolean runtime 已確認 高影響 Clear global memory.
--all boolean runtime 已確認 高影響 Clear all memory scopes.
-y, --yes boolean runtime 已確認 高影響 Skip confirmation.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
14 models 1 Shell 指令
grok models
runtime 已確認 唯讀

List available models and exit.

grok models [OPTIONS]
grok models / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
15 plugin 15 Shell 指令
grok plugin
runtime 已確認 需檢視

Manage plugins and marketplace sources.

grok plugin [OPTIONS] <COMMAND>
grok plugin / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin list
runtime 已確認 唯讀

List installed or available plugins.

grok plugin list [OPTIONS]
grok plugin list / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 唯讀 Emit JSON.
--available boolean runtime 已確認 唯讀 Include available marketplace plugins.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin install
runtime 已確認 高影響

Install a plugin from a git URL, GitHub shorthand, or local path.

grok plugin install [OPTIONS] <SOURCE>
grok plugin install / 選項
選項型態可用性風險Summary
--trust boolean runtime 已確認 高影響 Trust the plugin immediately and skip confirmation.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin uninstall
runtime 已確認 高影響

Uninstall an installed plugin.

grok plugin uninstall [OPTIONS] <NAME>
grok plugin uninstall / 選項
選項型態可用性風險Summary
--confirm boolean runtime 已確認 高影響 Skip confirmation for multi-plugin repositories.
--keep-data boolean runtime 已確認 唯讀 Preserve the plugin data directory.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin update
runtime 已確認 高影響

Update one plugin or all installed plugins.

grok plugin update [OPTIONS] [NAME]
grok plugin update / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin enable
runtime 已確認 需檢視

Enable an installed plugin.

grok plugin enable [OPTIONS] <NAME>
grok plugin enable / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin disable
runtime 已確認 需檢視

Disable an installed plugin.

grok plugin disable [OPTIONS] <NAME>
grok plugin disable / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin details
runtime 已確認 唯讀

Show plugin metadata and capabilities.

grok plugin details [OPTIONS] <NAME>
grok plugin details / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin validate
runtime 已確認 唯讀

Validate a plugin manifest and layout.

grok plugin validate [OPTIONS] [PATH]
grok plugin validate / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin tag
runtime 已確認 高影響

Create a release git tag from a plugin manifest version.

grok plugin tag [OPTIONS] [PATH]
grok plugin tag / 選項
選項型態可用性風險Summary
--push boolean runtime 已確認 高影響 Push the tag to the remote.
-f, --force boolean runtime 已確認 高影響 Tag even when the worktree is dirty or the tag exists.
--dry-run boolean runtime 已確認 唯讀 Print the proposed tag without creating it.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin marketplace
runtime 已確認 需檢視

Manage plugin marketplace sources.

grok plugin marketplace [OPTIONS] <COMMAND>
grok plugin marketplace / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin marketplace list
runtime 已確認 唯讀

List configured marketplace sources and their plugins.

grok plugin marketplace list [OPTIONS]
grok plugin marketplace list / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 唯讀 Emit JSON.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin marketplace add
runtime 已確認 高影響

Add a marketplace source.

grok plugin marketplace add [OPTIONS] <URL>
grok plugin marketplace add / 選項
選項型態可用性風險Summary
--force boolean runtime 已確認 高影響 Replace conflicting marketplace state.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin marketplace remove
runtime 已確認 高影響

Remove a marketplace source and uninstall its plugins.

grok plugin marketplace remove [OPTIONS] <SOURCE>
grok plugin marketplace remove / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok plugin marketplace update
runtime 已確認 高影響

Refresh marketplace sources and synchronize their git caches.

grok plugin marketplace update [OPTIONS] [NAME]
grok plugin marketplace update / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
16 sessions 4 Shell 指令
grok sessions
runtime 已確認 需檢視

List, search, or delete sessions.

grok sessions [OPTIONS] <COMMAND>
grok sessions / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok sessions list
runtime 已確認 唯讀

List recent sessions.

grok sessions list [OPTIONS]
grok sessions list / 選項
選項型態可用性風險Summary
-n, --limit LIMIT integer runtime 已確認 唯讀 Limit the number of results.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok sessions search
runtime 已確認 需檢視

Search persisted sessions by keyword.

grok sessions search [OPTIONS] <QUERY>
grok sessions search / 選項
選項型態可用性風險Summary
-n, --limit LIMIT integer runtime 已確認 唯讀 Limit the number of results.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok sessions delete
runtime 已確認 高影響

Permanently delete a session from local history.

grok sessions delete [OPTIONS] <ID>
grok sessions delete / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
17 setup 1 Shell 指令
grok setup
runtime 已確認 高影響

Fetch and install managed configuration.

grok setup [OPTIONS]
grok setup / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 需檢視 Print the served configuration without installing it; review before sharing.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
18 trace 1 Shell 指令
grok trace
runtime 已確認 高影響

Export or upload session trace data.

grok trace [OPTIONS] <SESSION_ID>
grok trace / 選項
選項型態可用性風險Summary
--local boolean runtime 已確認 需檢視 Save locally and skip remote upload.
-o, --output OUTPUT path runtime 已確認 需檢視 Select the local trace archive path.
--json boolean runtime 已確認 唯讀 Emit JSON status.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
19 update 1 Shell 指令
grok update
runtime 已確認 高影響

Check for updates or install a selected version or channel.

grok update [OPTIONS]
grok update / 選項
選項型態可用性風險Summary
--check boolean runtime 已確認 唯讀 Check without installing.
--json boolean runtime 已確認 唯讀 Emit JSON for an update check.
--force-reinstall boolean runtime 已確認 高影響 Download and reinstall even when already current.
--version VERSION string runtime 已確認 高影響 Install a specific release version.
--alpha boolean runtime 已確認 需檢視 Switch to the faster-moving alpha channel.
--stable boolean runtime 已確認 需檢視 Switch to the stable release channel.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok update --check --json
grok-runtime-1.0.0
20 version 1 Shell 指令
grok version
runtime 已確認 唯讀

Print detailed version information.

grok version [OPTIONS]

別名 grok v

grok version / 選項
選項型態可用性風險Summary
--json boolean runtime 已確認 唯讀 Emit JSON.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok version --json
grok-runtime-1.0.0
21 worktree 9 Shell 指令
grok worktree
runtime 已確認 需檢視

Manage git worktrees created for sessions.

grok worktree [OPTIONS] <COMMAND>
grok worktree / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok worktree list
runtime 已確認 唯讀

List tracked worktrees.

grok worktree list [OPTIONS]
grok worktree list / 選項
選項型態可用性風險Summary
--repo REPO path runtime 已確認 唯讀 Filter by repository.
--type TYPE string runtime 已確認 唯讀 Filter by worktree type.
--json boolean runtime 已確認 唯讀 Emit JSON.
--all boolean runtime 已確認 唯讀 Include all tracked worktrees.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok worktree show
runtime 已確認 唯讀

Show details for one worktree.

grok worktree show [OPTIONS] <ID_OR_PATH>
grok worktree show / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok worktree rm
runtime 已確認 高影響

Remove one or more tracked worktrees.

grok worktree rm [OPTIONS] <IDS>...
grok worktree rm / 選項
選項型態可用性風險Summary
-f, --force boolean runtime 已確認 高影響 Force removal.
--dry-run boolean runtime 已確認 唯讀 Show what would be removed.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok worktree rm --dry-run <id>
grok-runtime-1.0.0
grok worktree gc
runtime 已確認 高影響

Garbage-collect orphaned or stale worktrees.

grok worktree gc [OPTIONS]
grok worktree gc / 選項
選項型態可用性風險Summary
--dry-run boolean runtime 已確認 唯讀 Show candidates without removing them.
--max-age MAX_AGE string runtime 已確認 唯讀 Set the maximum age used for collection.
-f, --force boolean runtime 已確認 高影響 Force garbage collection.
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok worktree gc --dry-run
grok-runtime-1.0.0
grok worktree db
runtime 已確認 需檢視

Maintain the worktree tracking database.

grok worktree db [OPTIONS] <COMMAND>
grok worktree db / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok worktree db rebuild
runtime 已確認 高影響

Rebuild the tracking database from a filesystem scan.

grok worktree db rebuild [OPTIONS]
grok worktree db rebuild / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok worktree db stats
runtime 已確認 唯讀

Show worktree database statistics.

grok worktree db stats [OPTIONS]
grok worktree db stats / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
grok worktree db path
runtime 已確認 唯讀

Print the worktree database path.

grok worktree db path [OPTIONS]
grok worktree db path / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
grok-runtime-1.0.0
22 wrap 1 Shell 指令
grok wrap
runtime 已確認 需檢視

Run a command in a local PTY that forwards OSC 52 clipboard writes.

grok wrap [OPTIONS] <CMD>...
grok wrap / 選項
選項型態可用性風險Summary
--debug boolean runtime 已確認 需檢視 Enable debug logging.
--debug-file FILE path runtime 已確認 需檢視 Write debug logs to a file; review logs before sharing them.
-h, --help boolean runtime 已確認 唯讀 Print help for this command.
--leader-socket PATH path runtime 已確認 唯讀 Use a custom leader socket path.
範例
grok wrap docker exec -it my-container bash
grok-runtime-1.0.0

02 / INTERACTIVE

TUI 斜線指令

互動 token 不是 shell 子指令;僅存在 source 的項目仍維持 preview 標示。

/new 文件已確認

Start a fresh session.

別名: /clear
/resume 文件已確認

Open the session picker.

/dashboard 文件已確認

Open the Agent Dashboard.

別名: /agents-dashboard, /sessions
/compact 文件已確認

Compact conversation history with an optional preservation note.

/context 文件已確認

Show context-window usage.

/session-info 文件已確認

Show session, authentication, model, turn, and context metadata.

別名: /status, /info
/fork 文件已確認

Branch the current session into a peer agent.

/rewind 文件已確認

Roll back to an earlier turn.

/edit-prompt source 預覽

Open an external editor for the prompt in minimal mode.

/copy 文件已確認

Copy a recent response.

/export 文件已確認

Export the conversation.

/quit 文件已確認

Quit Grok Build.

別名: /exit
/help 文件已確認

Browse commands and keyboard shortcuts.

/home 文件已確認

Return to the welcome screen.

別名: /welcome
/delete source 預覽

Delete the current session after confirmation.

/rename 文件已確認

Rename the current session.

別名: /title
/share 文件已確認

Share the current session through a URL.

/find 文件已確認

Search conversation scrollback.

/transcript 文件已確認

Open the transcript in the configured pager.

/model 文件已確認

Switch the active model.

別名: /m
/effort 文件已確認

Set reasoning effort.

/always-approve 文件已確認

Toggle always-approve permission mode.

/auto 文件已確認

Toggle classifier-assisted auto approval when enabled.

/multiline 文件已確認

Toggle multiline prompt entry.

別名: /ml
/history source 預覽

Search prompt history.

/compact-mode 文件已確認

Toggle denser rendering.

/vim-mode 文件已確認

Toggle vim-style scrollback navigation.

/minimal source 預覽

Switch to scrollback-native rendering.

/fullscreen source 預覽

Switch to fullscreen rendering.

/plan 文件已確認

Enter plan mode.

/view-plan 文件已確認

Open the saved plan.

別名: /show-plan, /plan-view
/memory 文件已確認

Browse or toggle cross-session memory.

別名: /mem
/flush 文件已確認

Flush conversation knowledge to memory.

/dream 文件已確認

Run memory consolidation.

/remember 文件已確認

Save a memory note.

/hooks 文件已確認

Open the Hooks extensions tab.

/plugins 文件已確認

Open the Plugins extensions tab.

/marketplace 文件已確認

Open the Marketplace extensions tab.

/skills 文件已確認

Open the Skills extensions tab.

/mcps 文件已確認

Open the MCP extensions tab.

/imagine 文件已確認

Generate an image from a prompt when available.

/imagine-video 文件已確認

Generate a video when available.

/loop 文件已確認

Schedule a recurring prompt.

/goal source 預覽

Start or inspect a goal workflow.

/deep-research source 預覽

Run a deep-research workflow.

/workflow source 預覽

Manage one background workflow.

/workflows source 預覽

Open the workflow run dashboard.

/tasks 文件已確認

List tasks, subagents, and schedules.

/queue 文件已確認

List queued prompts.

/theme 文件已確認

Select the TUI theme.

別名: /t
/feedback 文件已確認

Send product feedback.

/btw 文件已確認

Ask a side question without interrupting the main turn.

/doctor source 預覽

Inspect terminal and sandbox support.

別名: /terminal-check, /terminal-info
/release-notes 文件已確認

Show release notes.

別名: /changelog
/docs source 預覽

Browse bundled or web documentation.

別名: /howto, /guides
/tutorial source 預覽

Open the onboarding tutorial.

別名: /tour, /onboarding
/import-claude 文件已確認

Open the compatibility-settings import modal.

/config-agents 文件已確認

Manage agent definitions.

別名: /agents
/personas 文件已確認

Manage personas.

/login 文件已確認

Sign in.

/logout 文件已確認

Sign out.

/usage 文件已確認

View usage and billing controls.

/privacy 文件已確認

View privacy and retention status.

/settings 文件已確認

Open settings.

別名: /config
/timestamps 文件已確認

Toggle message timestamps.

/terminal-setup 文件已確認

Inspect terminal and clipboard support.

03 / PUBLIC SCHEMA

設定結構

只列公開鍵名與資料型態,不讀取任何本機值。

Key型態預設可用性Summary
models.default string 文件已確認 Default model for new sessions.
models.web_search string 文件已確認 Model used by client-side web search.
models.default_reasoning_effort enum: low | medium | high 文件已確認 Default reasoning effort.
models.session_summary string 文件已確認 Model used for session summaries.
models.image_description string 文件已確認 Model used for image description.
models.extra_headers object 文件已確認 Headers applied to every model. · 敏感
models.temperature number 文件已確認 Global temperature default.
models.top_p number 文件已確認 Global top-p default.
models.max_completion_tokens integer 文件已確認 Global completion-token limit.
models.max_retries integer 文件已確認 Global inference retry limit.
models.stream_tool_calls boolean 文件已確認 Stream tool-call request content.
models.allowed_models array 文件已確認 Restrict selectable models by glob.
models.hidden_models array 文件已確認 Hide models from the picker.
models.disabled_models array 文件已確認 Remove models from the catalog.
model.<id>.model string 文件已確認 Provider model ID.
model.<id>.base_url url 文件已確認 Provider inference endpoint.
model.<id>.name string 文件已確認 Model-picker label.
model.<id>.description string 文件已確認 Model description.
model.<id>.api_key string 文件已確認 Inline API key; prefer env_key. · 敏感
model.<id>.env_key string 文件已確認 Name of the environment variable containing the API key.
model.<id>.api_backend enum: chat_completions | responses | messages 文件已確認 Provider protocol.
model.<id>.temperature number 文件已確認 Per-model temperature.
model.<id>.top_p number 文件已確認 Per-model top-p.
model.<id>.max_completion_tokens integer 文件已確認 Per-model completion-token limit.
model.<id>.context_window integer 文件已確認 Context-window size.
model.<id>.extra_headers object 文件已確認 Per-request headers. · 敏感
model.<id>.supports_backend_search boolean 文件已確認 Whether provider-hosted search is supported.
model.<id>.supports_reasoning_effort boolean 文件已確認 Whether reasoning effort is supported.
model.<id>.reasoning_effort enum: low | medium | high 文件已確認 Per-model reasoning effort.
model.<id>.stream_tool_calls boolean 文件已確認 Per-model tool-call streaming.
model.<id>.max_retries integer 文件已確認 Per-model retry limit.
model.<id>.inference_idle_timeout_secs integer 文件已確認 Inference idle timeout.
mcp_servers.<name>.command string 文件已確認 Executable for a stdio MCP server.
mcp_servers.<name>.args array 文件已確認 Arguments for a stdio MCP server.
mcp_servers.<name>.env object 文件已確認 Environment for a stdio MCP process. · 敏感
mcp_servers.<name>.cwd path 文件已確認 Working directory for a stdio MCP process.
mcp_servers.<name>.url url 文件已確認 Remote MCP URL.
mcp_servers.<name>.headers object 文件已確認 Remote MCP headers. · 敏感
mcp_servers.<name>.bearer_token_env_var string 文件已確認 Environment variable used for a bearer token.
mcp_servers.<name>.enabled boolean true 文件已確認 Enable the MCP server.
mcp_servers.<name>.startup_timeout_sec integer 30 文件已確認 Startup handshake timeout.
mcp_servers.<name>.tool_timeout_sec integer 6000 文件已確認 Default per-tool timeout.
mcp_servers.<name>.tool_timeouts object 文件已確認 Per-tool timeout overrides.
tools.respect_gitignore boolean false 文件已確認 Skip gitignored files in search and read tools.
toolset.file_toolset enum: standard | hashline standard 文件已確認 File editing scheme.
toolset.bash.timeout_secs integer 120 文件已確認 Foreground bash timeout.
toolset.bash.output_byte_limit integer 20000 文件已確認 Maximum captured bash output.
toolset.bash.max_timeout_secs integer 36000 文件已確認 Maximum model-requested bash timeout.
toolset.bash.auto_background_on_timeout boolean true 文件已確認 Background commands that exceed the foreground timeout.
toolset.web_fetch.proxy_endpoint url 文件已確認 Egress proxy for web_fetch.
toolset.web_fetch.allowed_domains array 文件已確認 Domain allowlist for web_fetch.
sandbox.profile enum: off | workspace | devbox | read-only | strict off 文件已確認 Active sandbox profile.
sandbox.auto_allow_bash boolean false 文件已確認 Skip bash prompts inside an active sandbox.
sandbox.toml.profiles.<name>.extends enum: workspace | devbox | read-only | strict workspace 文件已確認 Built-in profile inherited by a custom profile.
sandbox.toml.profiles.<name>.restrict_network boolean 文件已確認 Restrict network access.
sandbox.toml.profiles.<name>.read_only array 文件已確認 Additional read-only paths.
sandbox.toml.profiles.<name>.read_write array 文件已確認 Additional writable paths.
sandbox.toml.profiles.<name>.deny array 文件已確認 Kernel-enforced denied paths or globs. · 敏感
session.auto_compact_threshold_percent integer 85 文件已確認 Context percentage that triggers automatic compaction.
session.load_envrc boolean true 文件已確認 Inject .envrc variables into bash. · 敏感
cli.auto_update boolean true 文件已確認 Check for updates on launch.
cli.channel enum: stable | alpha stable 文件已確認 Release channel.
cli.show_tips boolean 文件已確認 Show startup tips.
hints.new_session_worktree_mode enum: ask | always | never never 文件已確認 Whether /new offers a worktree.
hints.fork_worktree_mode enum: ask | always | never ask 文件已確認 Whether /fork offers a worktree.
ui.compact_mode boolean false 文件已確認 Use denser message padding.
ui.screen_mode enum: fullscreen | minimal fullscreen 文件已確認 Default TUI render mode.
ui.show_timestamps boolean true 文件已確認 Show message timestamps.
ui.show_timeline boolean false 文件已確認 Show a per-turn timeline.
ui.page_flip_on_send boolean true 文件已確認 Move the sent prompt to the top of the viewport.
ui.max_thoughts_width integer 120 文件已確認 Maximum thoughts-panel width.
ui.combine_queued_prompts boolean false 文件已確認 Merge consecutive queued prompts.
ui.theme string 文件已確認 Color theme.
ui.auto_dark_theme string groknight 文件已確認 Theme used for dark system appearance.
ui.auto_light_theme string grokday 文件已確認 Theme used for light system appearance.
ui.simple_mode boolean true 文件已確認 Use readline prompt editing.
ui.vim_mode boolean false 文件已確認 Use vim keys in scrollback.
ui.prompt_suggestions boolean true 文件已確認 Show next-prompt suggestions.
ui.mouse_reporting_toggle boolean false 文件已確認 Allow Ctrl+R to toggle terminal mouse capture.
ui.keep_text_selection enum: flash | hold | word_select flash 文件已確認 In-app selection behavior.
ui.cursor_blink boolean 文件已確認 Override terminal cursor blinking.
ui.show_thinking_blocks boolean true 文件已確認 Show reasoning blocks.
ui.group_tool_verbs boolean true 文件已確認 Fold consecutive read/search/list rows.
ui.collapsed_edit_blocks boolean false 文件已確認 Collapse edit blocks.
ui.render_mermaid enum: auto | on | off auto 文件已確認 Mermaid rendering mode.
ui.scroll_speed integer 50 文件已確認 Mouse and trackpad scroll speed.
ui.scroll_mode enum: auto | wheel | trackpad auto 文件已確認 Scroll-input interpretation.
ui.scroll_lines integer 文件已確認 Lines per scroll event.
ui.invert_scroll boolean false 文件已確認 Invert vertical scrolling.
ui.permission_mode enum: default | ask | auto | always-approve default 文件已確認 Default permission mode.
ui.default_selected_permission enum: always_allow_all_sessions | allow_command_always | allow_once | reject always_allow_all_sessions 文件已確認 Initially selected permission response.
ui.remember_tool_approvals boolean false 文件已確認 Show persistent per-tool approval choices.
ui.cancel_subagents_on_turn_cancel enum: ask | always_stop | always_continue ask 文件已確認 Policy for running subagents when cancelling a turn.
ui.hunk_tracker_mode enum: agent_only | all_dirty | off agent_only 文件已確認 File-change hunk tracking mode.
ui.fork_secondary_model string 文件已確認 Model used by the secondary fork agent.
ui.voice_keybind_enabled boolean true 文件已確認 Enable the voice key binding.
ui.voice_capture_mode enum: hold | toggle hold 文件已確認 Voice capture interaction.
ui.voice_stt_language string 文件已確認 Speech-to-text language.
ui.display_refresh.auto_cadence_enabled boolean false 文件已確認 Match animation cadence to display refresh.
ui.contextual_hints.undo boolean true 文件已確認 Show the undo hint.
ui.contextual_hints.plan_mode boolean true 文件已確認 Show the plan-mode hint.
ui.contextual_hints.image_input boolean true 文件已確認 Show the image-input hint.
ui.contextual_hints.send_now boolean true 文件已確認 Show the queued prompt send-now hint.
ui.contextual_hints.small_screen boolean true 文件已確認 Show the compact-mode hint.
ui.contextual_hints.word_select boolean true 文件已確認 Show the word-selection hint.
ui.contextual_hints.ssh_wrap boolean true 文件已確認 Recommend grok wrap when SSH clipboard integration is unavailable.
permission.allow array 文件已確認 Compact allow rules. · 敏感
permission.deny array 文件已確認 Compact deny rules. · 敏感
permission.ask array 文件已確認 Compact ask rules. · 敏感
permission.rules array 文件已確認 Structured allow, deny, and ask rules. · 敏感
features.web_fetch boolean 文件已確認 Enable web_fetch.
features.lsp_tools boolean false 文件已確認 Enable LSP tools.
features.write_file boolean true 文件已確認 Enable the write tool.
features.tool_search boolean true 文件已確認 Enable MCP tool discovery.
subagents.enabled boolean 文件已確認 Enable subagents.
subagents.toggle object 文件已確認 Enable or disable named subagent types.
subagents.models object 文件已確認 Select a model for each subagent type.
memory.enabled boolean false 文件已確認 Enable cross-session memory. · 敏感
skills.paths array 文件已確認 Additional skill directories.
skills.disabled array 文件已確認 Discovered skills that must not activate.
plugins.paths array 文件已確認 Additional plugin directories. · 敏感
plugins.disabled array 文件已確認 Plugins that must not activate.
plugins.enabled array 文件已確認 Explicitly enabled plugins. · 敏感
compat.cursor.skills boolean true 文件已確認 Scan cursor skills. · 敏感
compat.cursor.rules boolean true 文件已確認 Scan cursor rules. · 敏感
compat.cursor.agents boolean true 文件已確認 Scan cursor agents. · 敏感
compat.cursor.mcps boolean true 文件已確認 Scan cursor mcps. · 敏感
compat.cursor.hooks boolean true 文件已確認 Scan cursor hooks. · 敏感
compat.claude.skills boolean true 文件已確認 Scan claude skills. · 敏感
compat.claude.rules boolean true 文件已確認 Scan claude rules. · 敏感
compat.claude.agents boolean true 文件已確認 Scan claude agents. · 敏感
compat.claude.mcps boolean true 文件已確認 Scan claude mcps. · 敏感
compat.claude.hooks boolean true 文件已確認 Scan claude hooks. · 敏感
dashboard.enabled boolean source 預覽 Enable the Agent Dashboard.
terminal.alt_screen boolean source 預覽 Allow alternate-screen rendering.
mcp.max_output_bytes integer source 預覽 Project-scoped MCP tool-result size cap.

04 / NAMES, NEVER VALUES

環境變數名稱

只列名稱與用途;含憑證性質的變數會明確標記,絕不讀取其值。

Name敏感可用性Summary
GROK_HOME 文件已確認 Override the Grok home directory.
XAI_API_KEY 文件已確認 Authenticate a headless or API-key session.
GROK_DEFAULT_MODEL 文件已確認 Override the default model.
GROK_WEB_SEARCH_MODEL 文件已確認 Override the web-search model.
GROK_MODELS_BASE_URL 文件已確認 Override the inference base URL.
GROK_MODELS_LIST_URL 文件已確認 Override the model-list URL.
GROK_XAI_API_BASE_URL 文件已確認 Override the xAI API base URL.
GROK_DISABLE_AUTOUPDATER 文件已確認 Suppress the process auto-updater.
GROK_SANDBOX 文件已確認 Select a sandbox profile.
GROK_SANDBOX_AUTO_ALLOW_BASH 文件已確認 Auto-allow bash inside an active sandbox.
GROK_RESPECT_GITIGNORE 文件已確認 Override gitignore handling for read and search tools.
GROK_WEB_FETCH 文件已確認 Enable web_fetch.
GROK_WEB_FETCH_PROXY 文件已確認 Set the web_fetch egress proxy.
GROK_MEMORY 文件已確認 Enable cross-session memory.
GROK_SUBAGENTS 文件已確認 Enable subagents.
GROK_AGENT 文件已確認 Select an agent name or definition path.
GROK_WRITE_FILE 文件已確認 Enable or disable the write tool.
GROK_TOOL_SEARCH 文件已確認 Enable MCP tool discovery.
GROK_LSP_TOOLS 文件已確認 Enable LSP tools.
GROK_THEME 文件已確認 Select the theme.
GROK_SHOW_THINKING_BLOCKS 文件已確認 Show or hide reasoning blocks.
GROK_GROUP_TOOL_VERBS 文件已確認 Group consecutive tool rows.
GROK_COLLAPSED_EDIT_BLOCKS 文件已確認 Collapse edit blocks.
GROK_PROMPT_SUGGESTIONS 文件已確認 Enable prompt suggestions.
GROK_SCROLL_SPEED 文件已確認 Set scroll speed.
GROK_SCROLL_MODE 文件已確認 Set scroll-input interpretation.
GROK_SCROLL_LINES 文件已確認 Set lines per scroll event.
GROK_INVERT_SCROLL 文件已確認 Invert vertical scrolling.
GROK_DEFAULT_SELECTED_PERMISSION 文件已確認 Select the initial permission response.
GROK_REMEMBER_TOOL_APPROVALS 文件已確認 Show persistent approval choices.
GROK_MOUSE_REPORTING_TOGGLE 文件已確認 Enable the mouse-reporting toggle.
GROK_DISPLAY_REFRESH_AUTO_CADENCE 文件已確認 Match UI cadence to display refresh.
GROK_MCP_STARTUP_TIMEOUT_SECS 文件已確認 Set the MCP startup timeout in seconds.
MCP_TIMEOUT 文件已確認 Set the compatibility MCP timeout in milliseconds.
GROK_LOG_FILE 文件已確認 Write logs to a selected path.
RUST_LOG 文件已確認 Set the runtime log filter.
GROK_CRASH_HANDLER 文件已確認 Write crash reports under GROK_HOME.
HTTPS_PROXY 文件已確認 Set the HTTPS proxy.
HTTP_PROXY 文件已確認 Set the HTTP proxy.
NO_PROXY 文件已確認 Set proxy bypass hosts.
GROK_CURSOR_SKILLS_ENABLED 文件已確認 Enable the cursor skills compatibility scanner.
GROK_CURSOR_RULES_ENABLED 文件已確認 Enable the cursor rules compatibility scanner.
GROK_CURSOR_AGENTS_ENABLED 文件已確認 Enable the cursor agents compatibility scanner.
GROK_CURSOR_MCPS_ENABLED 文件已確認 Enable the cursor mcps compatibility scanner.
GROK_CURSOR_HOOKS_ENABLED 文件已確認 Enable the cursor hooks compatibility scanner.
GROK_CLAUDE_SKILLS_ENABLED 文件已確認 Enable the claude skills compatibility scanner.
GROK_CLAUDE_RULES_ENABLED 文件已確認 Enable the claude rules compatibility scanner.
GROK_CLAUDE_AGENTS_ENABLED 文件已確認 Enable the claude agents compatibility scanner.
GROK_CLAUDE_MCPS_ENABLED 文件已確認 Enable the claude mcps compatibility scanner.
GROK_CLAUDE_HOOKS_ENABLED 文件已確認 Enable the claude hooks compatibility scanner.
GROK_AGENT_SECRET runtime 已確認 Authenticate clients of grok agent serve.
GROK_AUTH_PROVIDER_COMMAND source 預覽 Select an external authentication helper.
GROK_AUTH_PROVIDER_LABEL source 預覽 Label the external authentication provider.
GROK_AUTH_TOKEN_TTL source 預覽 Set external token lifetime.
GROK_AUTH_EARLY_INVALIDATION_SECS source 預覽 Refresh an external token before expiry.
GROK_OIDC_ISSUER source 預覽 Set the OIDC issuer.
GROK_OIDC_CLIENT_ID source 預覽 Set the OIDC client ID.
GROK_CLI_CHAT_PROXY_BASE_URL source 預覽 Override the CLI chat proxy.
GROK_WORKFLOWS source 預覽 Enable background workflows.
GROK_WEB_FETCH_ALLOW_LOCAL source 預覽 Permit explicit loopback web_fetch targets.
GROK_TELEMETRY_ENABLED source 預覽 Enable telemetry.
GROK_TELEMETRY_TRACE_UPLOAD source 預覽 Enable trace upload.
GROK_TELEMETRY_MIXPANEL_ENABLED source 預覽 Enable Mixpanel telemetry.
GROK_EXTERNAL_OTEL source 預覽 Configure external OpenTelemetry export.
GROK_FEEDBACK_ENABLED source 預覽 Enable the feedback system.
GROK_DEPLOYMENT_KEY source 預覽 Authenticate managed configuration setup.
GROK_AGENT_DASHBOARD source 預覽 Enable the Agent Dashboard.

05 / RUNBOOKS

操作工作流程

每一步都引用同一份 manifest;修改狀態或對外服務的動作保留人工檢視邊界。

01

Run one bounded prompt

Use -p/--single with a machine-readable format and an explicit turn cap.

  1. Run a bounded prompt
    grok -p "Summarize the changes" --output-format json --max-turns 4

    The released CLI prints one JSON result and exits.

    需檢視
02

Embed Grok through ACP

Use the stdio agent transport for an ACP-capable editor or host.

  1. Start the ACP endpoint
    grok agent stdio

    The process speaks ACP over standard input and output.

    需檢視
03

Run a headless relay or WebSocket server

Choose relay headless mode or a locally bound authenticated WebSocket server.

  1. Prefer loopback binding
    grok agent serve --bind 127.0.0.1:2419

    Let Grok generate a secret and do not publish it in logs.

    高影響
04

Add and diagnose an MCP server

Add the server at an explicit scope, list it, then run doctor.

  1. Add a project server
    grok mcp add --scope project filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir

    Project scope writes .grok/config.toml; review the command and allowed directory.

    高影響
  2. Diagnose
    grok mcp doctor --json

    Use machine-readable diagnostics without exposing resolved secrets.

    需檢視
05

Inspect before installing a plugin

List sources, validate the plugin, and avoid immediate trust until its code is reviewed.

  1. Inspect available plugins
    grok plugin marketplace list --json

    Review the source and capabilities before installation.

    需檢視
  2. Validate a local checkout
    grok plugin validate /path/to/plugin

    Validation is not a security review, but catches structural problems.

    需檢視
06

Find and resume a session

Search local session metadata, then resume by an unambiguous ID or title.

  1. Search persisted sessions
    grok sessions search "migration" --limit 10

    Search may expose session titles; review captured output before sharing.

    需檢視
  2. Resume
    grok --resume <session-id>

    Use --fork-session when the original session must remain unchanged.

    需檢視
07

Review worktrees before cleanup

List and inspect worktrees, then perform a dry-run before removal or garbage collection.

  1. List worktrees
    grok worktree list --json

    Confirm repository and worktree state.

    唯讀
  2. Preview cleanup
    grok worktree gc --dry-run

    Do not use --force until dirty and unpushed work has been reviewed.

    需檢視
08

Diagnose before applying fixes

Capture diagnostics first, then review each automatic fix.

  1. Collect diagnostics
    grok doctor --json

    Keep paths and environment-derived details out of public bug reports.

    需檢視
  2. Review available fixes
    grok doctor fix

    Avoid --yes until the proposed local changes are understood.

    需檢視
09

Use source-preview TUI workflows conservatively

The public source guide documents /workflow and /workflows, but they are not release-confirmed shell commands.

  1. Inspect workflow help in the TUI
    /workflow help

    Availability depends on feature and release state; do not invoke it as grok workflow.

    需檢視

FIELD MANUAL

需要操作方法,而不只是旗標?

完整指南串起單次提示、傳輸模式、MCP、plugin、session、worktree、診斷、設定與 TUI。

開啟完整 CLI 指南 →

06 / PROVENANCE

證據帳本

  1. 01
    Grok Build 1.0.0 recursive help runtime-help / release / 1.0.0 / 2026-08-10
  2. 02
    Grok Build CLI reference and headless guide official-docs / reference / reference / 2026-07-31
  3. 03
    Grok Build settings reference official-docs / reference / reference / 2026-07-31
  4. 04
    Grok Build modes and commands official-docs / reference / reference / 2026-07-31
  5. 05
    Grok Build source-preview Clap definitions official-source / preview / 500129c714ad / 2026-07-31
  6. 06
    Grok Build source-preview TUI user guide official-source / preview / 500129c714ad / 2026-07-31