Summary
There's no built-in agent plugin for xAI's Grok, despite the official
grok CLI (github.com/xai-org, or via the plugin marketplace at
github.com/xai-org/plugin-marketplace) supporting exactly the
non-interactive shape ralph-tui's other agent plugins rely on.
What the grok CLI already supports (v0.2.118, confirmed locally)
- Non-interactive invocation:
grok -p "<prompt>" --always-approve --output-format <format>
- Multiple structured output formats, including
streaming-messages-json,
which is literally the Anthropic Messages wire format — i.e. directly
reusable against the same event-parsing logic the claude plugin already
has, with minimal translation.
- Auth via standard OAuth/OIDC user login (
~/.grok/auth.json, issuer
https://auth.x.ai) tied to a SuperGrok subscription — not a separate
pay-per-token API key, so driving it from ralph-tui rides the existing
consumer subscription rather than opening new billing.
grok agent headless/stdio subcommands exist too, for deeper
streaming control if the simple -p/--output-format path isn't enough.
Why this matters
Every other major coding-agent CLI with a comparable non-interactive mode
(Claude Code, Codex, Gemini CLI, Cursor Agent, OpenCode, Kimi, Droid, Kiro,
Pi) already has a built-in plugin. Grok is a notable gap given the CLI's
capabilities line up closely with the existing plugin shape.
Rough scope estimate
Comparable to the existing pi.ts/kimi.ts built-in plugins (~300-400
lines): extend BaseAgentPlugin, override meta (id grok,
defaultCommand: 'grok'), detect() (find binary + parse grok --version),
buildArgs() (-p, --always-approve/equivalent flag, --output-format streaming-messages-json, --model passthrough), and reuse/adapt the
existing Claude-wire-format JSONL parser for the streaming-messages-json
output.
Happy to contribute a PR for this if there's interest — wanted to check
whether it's already under consideration first.
Summary
There's no built-in agent plugin for xAI's Grok, despite the official
grokCLI (github.com/xai-org, or via the plugin marketplace atgithub.com/xai-org/plugin-marketplace) supporting exactly thenon-interactive shape ralph-tui's other agent plugins rely on.
What the
grokCLI already supports (v0.2.118, confirmed locally)grok -p "<prompt>" --always-approve --output-format <format>streaming-messages-json,which is literally the Anthropic Messages wire format — i.e. directly
reusable against the same event-parsing logic the
claudeplugin alreadyhas, with minimal translation.
~/.grok/auth.json, issuerhttps://auth.x.ai) tied to a SuperGrok subscription — not a separatepay-per-token API key, so driving it from ralph-tui rides the existing
consumer subscription rather than opening new billing.
grok agent headless/stdiosubcommands exist too, for deeperstreaming control if the simple
-p/--output-formatpath isn't enough.Why this matters
Every other major coding-agent CLI with a comparable non-interactive mode
(Claude Code, Codex, Gemini CLI, Cursor Agent, OpenCode, Kimi, Droid, Kiro,
Pi) already has a built-in plugin. Grok is a notable gap given the CLI's
capabilities line up closely with the existing plugin shape.
Rough scope estimate
Comparable to the existing
pi.ts/kimi.tsbuilt-in plugins (~300-400lines): extend
BaseAgentPlugin, overridemeta(idgrok,defaultCommand: 'grok'),detect()(find binary + parsegrok --version),buildArgs()(-p,--always-approve/equivalent flag,--output-format streaming-messages-json,--modelpassthrough), and reuse/adapt theexisting Claude-wire-format JSONL parser for the streaming-messages-json
output.
Happy to contribute a PR for this if there's interest — wanted to check
whether it's already under consideration first.