TZBuild
Unofficial VS Code sidebar for your local grok CLI (grok agent stdio / ACP).
TZBuild is not affiliated with, endorsed by, or sponsored by xAI. “Grok” and “Grok Build” are trademarks of their owners. This extension is a client UI only — agent work, models, billing, and quotas stay with the official CLI.
Site: https://tigerte.cn · Source: github.com/Hypocrite65/tzbuild-vscode
Three different icon files — do not reuse one for all surfaces:
| File |
Where it shows |
icon.png |
Marketplace / Extensions list (128×128 geometric TZ on a dark plate) |
marketplace-icon.png |
Same bitmap as icon.png (copy, not shared with the header) |
logo.svg |
Chat header |
icon.svg |
Activity bar (monochrome mask) |
What it does
- Sidebar chat in the TZBuild activity-bar view (same row as Explorer)
- Talks to a locally installed
grok over ACP stdio — the extension does not call the model API itself
- Composer: attachments (images / files / paste), model, reasoning effort, session mode (Normal / Plan / Auto / Always-approve), context used/total, send
- Sandbox flag (
--sandbox) with an honest Windows note: kernel isolation is Linux/macOS
- Session home (latest chats, expand all), rename, history
- Sessions are created only after the first message
- Stop cancels the prompt and kills the grok process tree
- Thought text is hidden by default; 显示思考 only toggles display, it does not change
--reasoning-effort
- Slash commands are handled by the extension (local) or forwarded to grok; they are not sent as ordinary chat text.
/compact compresses the live session; /plan /auto /always-approve switch the same modes as grok Shift+Tab. History matches grok resume (updates.jsonl) and the home search box uses grok's session index.
- Tool cards keep the command/path and the output after status updates
- Live “LLM 工作中” bar (elapsed time; stale warning if nothing new arrives)
Requirements
This extension is only the sidebar. If grok already works in your terminal, install TZBuild and open a project folder — no extra script.
- VS Code 1.85+ (or Cursor)
- Official grok CLI on this machine (
grok in a terminal, or ~/.grok/bin/grok)
grok login (SuperGrok / Heavy) or XAI_API_KEY
If grok is missing, use the official installer (not this extension):
Windows: irm https://x.ai/cli/install.ps1 | iex then grok login
macOS / Linux: curl -fsSL https://x.ai/cli/install.sh | bash then grok login
PCs that cannot download from x.ai: copy grok.exe from a machine that already has grok into %USERPROFILE%\.grok\bin (and add that folder to User PATH). Do not copy auth.json.
Do not copy ~/.grok/auth.json between machines.
Usage
- Install this extension (Marketplace or
.vsix).
- Open a project folder.
- Click the TZBuild icon in the activity bar. If it sits in the
... overflow, drag it onto the main bar. Command: TZBuild: 打开侧边栏 (Ctrl+Alt+G / Cmd+Alt+G).
- Type a task. Enter sends,
Shift+Enter inserts a newline. + attaches images or files; screenshots paste as images.
- Approve or reject file writes and shell commands in the sidebar (unless Always-approve is on). Plan only allows writing
plan.md until you leave that mode.
| Action |
Where |
| New session |
Header 新会话 or /new |
| History |
Header 历史会话 or /resume |
| Rename |
Header 重命名, or on a history card |
| Stop |
Header 停止 |
| Show/hide thought text |
Header 显示思考 / 隐藏思考 |
| Model / effort / sandbox / mode |
Composer chips. Mode matches grok: Normal, Plan, Auto, Always-approve |
| Diagnostics |
/diag or TZBuild: 诊断 → ~/.grok/kit-diag.json and output TZBuild ACP |
设置: only VS Code Settings (search TZBuild), command TZBuild: 打开设置, sidebar gear, or /settings. Values load from TZBuild-config.toml (empty if that file is missing). Each field writes that file on Enter. 获取 Base Url可用模型 uses the URL and API Key. 获取 Authenticator 可用模型 lists the grok.com account catalog. Authenticator login ignores Base Url and applies official grok toml; log out to use Base Url. 应用 TZBuild-config.toml merges into the grok config path (default ~/.grok/config.toml). API Key is stored in the OS secret store via TZBuild: 通过 API Key 登录. Roles write to ~/.grok/AGENTS.md, workspace AGENTS.md, and .grok/rules/tzbuild.md.
The account line reads first_name / email from ~/.grok/auth.json. API-key-only setups show 未登录; the CLI can still run.
Usage limits stay on the grok.com (or API key) account. /usage in the sidebar.
Privacy
- No telemetry from this extension.
- It spawns local
grok and speaks ACP on stdio.
- It reads display name and email from
auth.json for the header only.
Disclaimer
Community client. Agent behavior, models, billing, and quotas are provided by the official Grok Build CLI and xAI.