證據邊界
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
- 環境變數名稱
RELEASE / DOCS / SOURCE
已知差異
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-31concise 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-31source 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-500129chidden 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-3101 / SHELL TREE
Shell 指令
62 Shell 指令 / 22 個指令群組 / 359 選項
01 root 1 Shell 指令
grok Launch the Grok Build TUI, run one prompt, or select a subcommand.
grok [OPTIONS] [PROMPT] [COMMAND] | 選項 | 型態 | 可用性 | 風險 | 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. |
grokgrok -p "Explain this repository"grok -p "List TODOs" --output-format json 02 help 1 Shell 指令
grok help Print root or nested command help.
grok help [COMMAND]... 沒有此指令專用的公開選項。
grok help mcp add 03 agent 5 Shell 指令
grok agent Run Grok without the interactive TUI.
grok agent [OPTIONS] [COMMAND] | 選項 | 型態 | 可用性 | 風險 | 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 agent stdio Run Grok as an ACP agent over standard input and output.
grok agent stdio [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 agent headless Run the agent headlessly over the Grok WebSocket relay.
grok agent headless [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 agent serve Run the agent as a WebSocket server.
grok agent serve [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 agent leader Run the shared leader process used by other clients.
grok agent leader [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
04 completions 1 Shell 指令
grok completions Generate a shell completion script.
grok completions [OPTIONS] <SHELL> | 選項 | 型態 | 可用性 | 風險 | 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 05 dashboard 1 Shell 指令
grok dashboard Open the Agent Dashboard at startup.
grok dashboard [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
06 doctor 2 Shell 指令
grok doctor Check terminal, clipboard, color, input, notification, and sandbox support.
grok doctor [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 doctor fix Apply available automatic terminal fixes.
grok doctor fix [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 fixgrok doctor fix --yes 07 export 1 Shell 指令
grok export Export a session transcript as Markdown.
grok export [OPTIONS] <SESSION_ID> [OUTPUT] | 選項 | 型態 | 可用性 | 風險 | 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. |
08 inspect 1 Shell 指令
grok inspect Show configuration, rules, skills, plugins, hooks, and MCP servers discovered for the directory.
grok inspect [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 inspectgrok inspect --json 09 leader 4 Shell 指令
grok leader Manage running leader processes.
grok leader [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 leader list List discovered leader processes.
grok leader list [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 leader info Show information about one leader process.
grok leader info [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 leader kill Stop a running leader process.
grok leader kill [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
10 login 1 Shell 指令
grok login Sign in to Grok Build.
grok login [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 logingrok login --device-auth 11 logout 1 Shell 指令
grok logout Sign out and clear cached credentials.
grok logout [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
12 mcp 7 Shell 指令
grok mcp Manage MCP server configurations.
grok mcp [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 mcp list List configured MCP servers.
grok mcp list [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 mcp add Add or replace a user- or project-scoped MCP server.
grok mcp add [OPTIONS] <NAME> [COMMAND_OR_URL] [ARGS]... | 選項 | 型態 | 可用性 | 風險 | 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/dirgrok mcp add --transport http docs https://example.invalid/mcp grok mcp remove Remove an MCP server from one configuration scope.
grok mcp remove [OPTIONS] <NAME> | 選項 | 型態 | 可用性 | 風險 | 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 mcp enable Enable a configured MCP server.
grok mcp enable [OPTIONS] <NAME> | 選項 | 型態 | 可用性 | 風險 | 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 mcp disable Disable a configured MCP server.
grok mcp disable [OPTIONS] <NAME> | 選項 | 型態 | 可用性 | 風險 | 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 mcp doctor Diagnose MCP configuration and connectivity.
grok mcp doctor [OPTIONS] [NAME] | 選項 | 型態 | 可用性 | 風險 | 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 13 memory 2 Shell 指令
grok memory Manage cross-session memory.
grok memory [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 memory clear Delete workspace, global, or all memory files.
grok memory clear [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
14 models 1 Shell 指令
grok models List available models and exit.
grok models [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
15 plugin 15 Shell 指令
grok plugin Manage plugins and marketplace sources.
grok plugin [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 plugin list List installed or available plugins.
grok plugin list [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 plugin install Install a plugin from a git URL, GitHub shorthand, or local path.
grok plugin install [OPTIONS] <SOURCE> | 選項 | 型態 | 可用性 | 風險 | 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 plugin uninstall Uninstall an installed plugin.
grok plugin uninstall [OPTIONS] <NAME> | 選項 | 型態 | 可用性 | 風險 | 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 plugin update Update one plugin or all installed plugins.
grok plugin update [OPTIONS] [NAME] | 選項 | 型態 | 可用性 | 風險 | 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 plugin enable Enable an installed plugin.
grok plugin enable [OPTIONS] <NAME> | 選項 | 型態 | 可用性 | 風險 | 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 plugin disable Disable an installed plugin.
grok plugin disable [OPTIONS] <NAME> | 選項 | 型態 | 可用性 | 風險 | 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 plugin details Show plugin metadata and capabilities.
grok plugin details [OPTIONS] <NAME> | 選項 | 型態 | 可用性 | 風險 | 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 plugin validate Validate a plugin manifest and layout.
grok plugin validate [OPTIONS] [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 plugin tag Create a release git tag from a plugin manifest version.
grok plugin tag [OPTIONS] [PATH] | 選項 | 型態 | 可用性 | 風險 | 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 plugin marketplace Manage plugin marketplace sources.
grok plugin marketplace [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 plugin marketplace list List configured marketplace sources and their plugins.
grok plugin marketplace list [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 plugin marketplace add Add a marketplace source.
grok plugin marketplace add [OPTIONS] <URL> | 選項 | 型態 | 可用性 | 風險 | 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 plugin marketplace remove Remove a marketplace source and uninstall its plugins.
grok plugin marketplace remove [OPTIONS] <SOURCE> | 選項 | 型態 | 可用性 | 風險 | 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 plugin marketplace update Refresh marketplace sources and synchronize their git caches.
grok plugin marketplace update [OPTIONS] [NAME] | 選項 | 型態 | 可用性 | 風險 | 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. |
16 sessions 4 Shell 指令
grok sessions List, search, or delete sessions.
grok sessions [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 sessions list List recent sessions.
grok sessions list [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 sessions search Search persisted sessions by keyword.
grok sessions search [OPTIONS] <QUERY> | 選項 | 型態 | 可用性 | 風險 | 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 sessions delete Permanently delete a session from local history.
grok sessions delete [OPTIONS] <ID> | 選項 | 型態 | 可用性 | 風險 | 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. |
17 setup 1 Shell 指令
grok setup Fetch and install managed configuration.
grok setup [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
18 trace 1 Shell 指令
grok trace Export or upload session trace data.
grok trace [OPTIONS] <SESSION_ID> | 選項 | 型態 | 可用性 | 風險 | 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. |
19 update 1 Shell 指令
grok update Check for updates or install a selected version or channel.
grok update [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 20 version 1 Shell 指令
grok version Print detailed version information.
grok version [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 21 worktree 9 Shell 指令
grok worktree Manage git worktrees created for sessions.
grok worktree [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 worktree list List tracked worktrees.
grok worktree list [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 worktree show Show details for one worktree.
grok worktree show [OPTIONS] <ID_OR_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 worktree rm Remove one or more tracked worktrees.
grok worktree rm [OPTIONS] <IDS>... | 選項 | 型態 | 可用性 | 風險 | 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 worktree gc Garbage-collect orphaned or stale worktrees.
grok worktree gc [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 worktree db Maintain the worktree tracking database.
grok worktree db [OPTIONS] <COMMAND> | 選項 | 型態 | 可用性 | 風險 | 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 worktree db rebuild Rebuild the tracking database from a filesystem scan.
grok worktree db rebuild [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 worktree db stats Show worktree database statistics.
grok worktree db stats [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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 worktree db path Print the worktree database path.
grok worktree db path [OPTIONS] | 選項 | 型態 | 可用性 | 風險 | 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. |
22 wrap 1 Shell 指令
grok wrap Run a command in a local PTY that forwards OSC 52 clipboard writes.
grok wrap [OPTIONS] <CMD>... | 選項 | 型態 | 可用性 | 風險 | 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 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;修改狀態或對外服務的動作保留人工檢視邊界。
Run one bounded prompt
Use -p/--single with a machine-readable format and an explicit turn cap.
- Run a bounded prompt
grok -p "Summarize the changes" --output-format json --max-turns 4The released CLI prints one JSON result and exits.
需檢視
Embed Grok through ACP
Use the stdio agent transport for an ACP-capable editor or host.
- Start the ACP endpoint
grok agent stdioThe process speaks ACP over standard input and output.
需檢視
Run a headless relay or WebSocket server
Choose relay headless mode or a locally bound authenticated WebSocket server.
- Prefer loopback binding
grok agent serve --bind 127.0.0.1:2419Let Grok generate a secret and do not publish it in logs.
高影響
Add and diagnose an MCP server
Add the server at an explicit scope, list it, then run doctor.
- Add a project server
grok mcp add --scope project filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dirProject scope writes .grok/config.toml; review the command and allowed directory.
高影響 - Diagnose
grok mcp doctor --jsonUse machine-readable diagnostics without exposing resolved secrets.
需檢視
Inspect before installing a plugin
List sources, validate the plugin, and avoid immediate trust until its code is reviewed.
- Inspect available plugins
grok plugin marketplace list --jsonReview the source and capabilities before installation.
需檢視 - Validate a local checkout
grok plugin validate /path/to/pluginValidation is not a security review, but catches structural problems.
需檢視
Find and resume a session
Search local session metadata, then resume by an unambiguous ID or title.
- Search persisted sessions
grok sessions search "migration" --limit 10Search may expose session titles; review captured output before sharing.
需檢視 - Resume
grok --resume <session-id>Use --fork-session when the original session must remain unchanged.
需檢視
Review worktrees before cleanup
List and inspect worktrees, then perform a dry-run before removal or garbage collection.
- List worktrees
grok worktree list --jsonConfirm repository and worktree state.
唯讀 - Preview cleanup
grok worktree gc --dry-runDo not use --force until dirty and unpushed work has been reviewed.
需檢視
Diagnose before applying fixes
Capture diagnostics first, then review each automatic fix.
- Collect diagnostics
grok doctor --jsonKeep paths and environment-derived details out of public bug reports.
需檢視 - Review available fixes
grok doctor fixAvoid --yes until the proposed local changes are understood.
需檢視
Use source-preview TUI workflows conservatively
The public source guide documents /workflow and /workflows, but they are not release-confirmed shell commands.
- Inspect workflow help in the TUI
/workflow helpAvailability depends on feature and release state; do not invoke it as grok workflow.
需檢視
FIELD MANUAL
需要操作方法,而不只是旗標?
完整指南串起單次提示、傳輸模式、MCP、plugin、session、worktree、診斷、設定與 TUI。
06 / PROVENANCE
證據帳本
- 01 Grok Build 1.0.0 recursive help runtime-help / release / 1.0.0 / 2026-08-10
- 02 Grok Build CLI reference and headless guide official-docs / reference / reference / 2026-07-31
- 03 Grok Build settings reference official-docs / reference / reference / 2026-07-31
- 04 Grok Build modes and commands official-docs / reference / reference / 2026-07-31
- 05 Grok Build source-preview Clap definitions official-source / preview / 500129c714ad / 2026-07-31
- 06 Grok Build source-preview TUI user guide official-source / preview / 500129c714ad / 2026-07-31