Grok CLI
- getHarness
- getHarness("grok")
- binary
- grok
- invoke modes
- 2 of 6 · official
- model listing
- no
- mcp config
- toml · standard
- agents file
- none
Grok writes an ACP update stream per session, updates.jsonl, that is the authoritative record of the conversation and its tool calls, with chat history, summaries and rewind points beside it. A local FTS5 index over titles and prompts backs its session search. Everything under ~/.grok/ moves with GROK_HOME, hence the note. It is the most thoroughly recorded session layout of the twelve, and the most annoying to read back by hand.
It reads more of other harnesses' files than any of them: AGENTS.md, Agents.md, AGENT.md, Claude.md, CLAUDE.md, CLAUDE.local.md are all loaded, and .claude/rules/ and .cursor/rules/ are scanned through vendor compatibility, as are Claude and Cursor hook sources. -p is short for --single. Its ACP parser knows audio blocks but the runtime rejects them, so audio is false. Native X search is a tool, so tools: true is what enables it through invoke.
Capabilities and invocation
mcp: yesvision: yesaudio: novideo: notools: yesstreaming: yes
Binary grok, evidence official. -p is short for --single; add --output-format json for structured output. Model selection appends --model {model}.
advisor
{}
advisor · json
{ structured: true }
read-only
{ readOnly: true }
read-only · json
{ readOnly: true, structured: true }
agent
{ tools: true }
-p {prompt}agent · json
{ tools: true, structured: true }
-p {prompt} --output-format jsonPaths
Templates as the registry stores them. ~, ${HOME} and %VAR% expand in resolve(); entries tagged with a platform are dropped on the others. Open in the explorer to see them expanded for a home directory of your choice.
config
~/.grok/config.tomluser · official · allBase directory overridable with GROK_HOME..grok/config.tomlproject · official · all
sessions
~/.grok/sessions/<encoded-cwd>/<session-id>/updates.jsonldata · official · allAuthoritative ACP session update stream (conversation + tool calls); session dirs also hold chat_history.jsonl, summary.json, rewind_points.jsonl.~/.grok/sessions/<encoded-cwd>/prompt_history.jsonldata · official · allPer-project prompt history.
instructions
AGENTS.mdproject · official · allAlso accepts Agents.md, AGENT.md, Claude.md, CLAUDE.md, CLAUDE.local.md; every matching file in a directory is loaded..grok/rules/project · official · all*.md rules scanned at each level from repo root to cwd; .claude/rules/ and .cursor/rules/ scanned via vendor compatibility.~/.grok/rules/user · official · allGlobal user-level rules.
skills
.grok/skills/project · official · all~/.grok/skills/user · official · allGlobal user-level skills.
commands
.grok/commands/project · official · all~/.grok/commands/user · official · allGlobal user-level slash commands.
hooks
.grok/hooks/project · official · all~/.grok/hooks/user · official · allJSON hook definitions (e.g. session-start.json); Claude/Cursor hook sources scanned via vendor compatibility.
MCP servers
~/.grok/config.tomluser · toml · standard · mcp_servers.grok/config.tomlproject · toml · standard · mcp_serversDetection
envVars
GROK_SESSION_IDGROK_WORKSPACE_ROOTGROK_HOME
projectMarkers
.grok
Persistence
- TOML - Configuration files. (official)
- JSONL - Session update streams, chat history, prompt history. (official)
- JSON - Session state files (summary.json, plan.json, signals.json). (official)
- SQLite - Local FTS5 index over session titles and prompts for sessions search. (official)
No stable user-scope instructions file, so syncAgentsFiles skips this harness.
Antigravity CLI
Google's second CLI, sharing ~/.gemini with Gemini CLI. Native audio and video attachments, conversations as Protocol Buffers, hooks in JSON.
OpenCode
XDG paths on every platform including Windows, one SQLite database for sessions, JSON or JSONC config at four locations, its own MCP dialect.