An unofficial macOS desktop client for the Grok CLI. Your sessions in a sidebar, the agent chat in the middle, the diff it just wrote on the right.
Design mockup of the three-pane layout, not a live capture. Real screenshots to follow.
Not affiliated with xAI. RockCode is an independent open-source client that drives the Grok CLI you install and authenticate yourself. "Grok" and "xAI" are trademarks of X.AI Corp. This project uses no xAI branding and is not endorsed by them.
- Session sidebar - every local Grok session, grouped by project (
~/.grok/sessions) - Search - filter sessions by title, summary, path, or id
- Chat - markdown messages, collapsible thinking, expandable tool calls
- Live agent - talks to
grok agent stdioover ACP (JSON-RPC) - Diff review - git status and unified diffs for the session working tree
- Permissions - approve or deny tool executions from the UI
- History restore - reopen a past TUI or headless session and keep chatting
- macOS
- Node.js 20+
- Grok CLI installed (
~/.grok/bin/grokor onPATH) - A Grok account - sign in from RockCode itself, or with
grok loginbeforehand
Install both, then verify:
# Node.js 20+ via nvm
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 22
nvm use 22
# Grok CLI
curl -fsSL https://x.ai/cli/install.sh | bash
# Verify
node -v
grok --versionNo separate login step is needed: RockCode shows a sign-in screen when ~/.grok/auth.json is
missing and runs the CLI's browser login for you. Running grok login in a terminal works too.
cd rock-code
npm install
npm run devnpm run dist produces an unsigned, un-notarized .dmg / .zip, so macOS Gatekeeper will
refuse to open it ("RockCode is damaged and can't be opened"). Clear the quarantine flag after
copying the app to /Applications:
xattr -dr com.apple.quarantine /Applications/RockCode.appOr right-click the app, choose Open, and confirm in the dialog. Only do this for builds you produced yourself or got from a source you trust.
RockCode never asks for a token. It reads ~/.grok/auth.json (read-only), where the Grok CLI
already cached your credentials, and shells out to grok for login. Nothing from that file is
copied into the app's storage or written back.
Plan usage is best-effort. The CLI exposes no ACP method or headless command for
/usage show, so the usage panel callsGET https://cli-chat-proxy.grok.com/v1/billing?format=creditswith that cached token. The endpoint is undocumented and unversioned - xAI can change or remove it at any time, and the usage panel is the only part of the app that breaks when they do. Override the base withGROK_CLI_CHAT_PROXY_BASE_URL.
| Command | Description |
|---|---|
npm run dev |
Start Electron + Vite in development |
npm run build |
Bundle main, preload, and renderer |
npm run typecheck |
TypeScript checks |
npm run pack |
Build an unpackaged macOS app |
npm run dist |
Build distributable .dmg / .zip |
| File | Use |
|---|---|
resources/icon.icns |
macOS app icon |
resources/icon.png |
Master app icon (PNG) |
resources/logo.svg |
Vector mark (source of every raster asset) |
resources/wordmark.svg |
Icon + “RockCode” lockup |
resources/logo-small.svg |
Simplified mark for 16-32px renders |
electron/main/ Electron main process
session-store Reads ~/.grok/sessions
acp-client Spawns `grok agent stdio`
git-service status + unified diffs
electron/preload/ Secure IPC bridge
src/renderer/ React UI
src/shared/ Shared TypeScript types
Grok persists every conversation under:
~/.grok/sessions/<encoded-cwd>/<session-id>/
summary.json
updates.jsonl # ACP stream (source of truth for chat)
chat_history.jsonl
...
RockCode indexes those folders for the sidebar and rebuilds chat history from updates.jsonl.
For interactive work, the main process spawns:
grok agent stdioand speaks ACP over its stdio (initialize, session/new, session/load, session/prompt, session/update). With auto-approve off, permission prompts surface as a toast.
- Enter sends a prompt; Shift+Enter inserts a newline
- Toggle the right panel with the
⧉control in the chat header - Sessions refresh automatically when files under
~/.grok/sessionschange
MIT
