2026-07-17 16:45:10 +08:00
# grok-build-hud
2026-07-17 16:32:20 +08:00
2026-07-17 16:45:10 +08:00
**Live multi-line status strip for [Grok Build](https://x.ai/cli) — shipped as a Grok plugin**
2026-07-17 16:32:20 +08:00
2026-07-17 16:45:10 +08:00
> Primary docs (Chinese): [README.md](./README.md)
2026-07-17 16:32:20 +08:00
Always-on strip at the bottom of the **same Terminal tab** (tmux status — not a second window):
```text
Grok 4.5 · my-project · ●
ctx ██████░░░░ 50% (252k/500k) · i … o … c 99% · use 24% · t7 · ⚙212
◐ read_file… · ✓ grep × 3 · ▸ todos
```
| Feature | Description |
|---------|-------------|
| Context | Window % and token counts |
| Quota | Weekly/monthly usage (`grok login` required) |
| Tokens | Input / output / cache / reasoning from `turn_completed` |
| Activity | Tools, agents, todos |
| Theme | Follows Grok `[ui].theme` (not locked) |
| Multi-terminal | Independent session per tab |
| Language | Default **简体中文** ; English / 繁體 available |
2026-07-17 16:47:27 +08:00
Repo: http://172.238.15.154:3000/Redredchen01/grok-build-hud
2026-07-17 16:45:10 +08:00
Plugin id: `grok-build-hud` · version in [`plugin.json` ](./plugin.json )
---
## What it is
| Layer | Role |
|-------|------|
| **Delivery** | **Grok plugin** (`plugin.json` + `commands/` + `skills/` + `hooks/` ) |
| **Runtime** | Node CLI + **same-window tmux status strip** |
| **Skill** | Bundled agent skill for in-session discovery |
One line: a bottom status bar for Grok Build — context, quota, tokens, tools, todos.
2026-07-17 16:32:20 +08:00
---
## Requirements
2026-07-17 16:45:10 +08:00
- Grok Build CLI + `grok login`
- Node.js 18+ and npm
2026-07-17 16:32:20 +08:00
- tmux (`brew install tmux` on macOS)
---
2026-07-17 16:45:10 +08:00
## Install (recommended)
One script: **build CLI → install tmux HUD → register as Grok plugin** .
2026-07-17 16:32:20 +08:00
```bash
2026-07-17 16:47:27 +08:00
git clone http://172.238.15.154:3000/Redredchen01/grok-build-hud.git
cd grok-build-hud
2026-07-17 16:32:20 +08:00
bash scripts/install.sh
```
2026-07-17 16:45:10 +08:00
Then:
```bash
grok # Grok + bottom HUD (same tab)
grok-hud status
grok-hud settings
```
Reload hooks in Grok: `/hooks` then `r` if needed.
### PATH (if commands missing)
```bash
export PATH = " $( npm prefix -g) /bin: $HOME /.local/bin: $PATH "
```
---
## Install pieces
### CLI + same-window strip only
2026-07-17 16:32:20 +08:00
```bash
npm install && npm run build && npm link
npm run install-local
```
2026-07-17 16:45:10 +08:00
### Register as Grok plugin (slash commands + skill + hooks)
Build first (`dist/` is required by hooks):
2026-07-17 16:32:20 +08:00
```bash
2026-07-17 16:45:10 +08:00
npm install && npm run build
2026-07-17 16:32:20 +08:00
grok plugin install . --trust
grok plugin enable grok-build-hud
2026-07-17 16:45:10 +08:00
grok plugin validate .
2026-07-17 16:32:20 +08:00
```
2026-07-17 16:45:10 +08:00
> Plugin-only install gives `/hud` etc. and scrollback annotations, **not** the multi-line tmux bar. Use `install.sh` for the full experience.
### Update
2026-07-17 16:32:20 +08:00
```bash
2026-07-17 16:45:10 +08:00
git pull && bash scripts/install.sh
# or: grok plugin update grok-build-hud
2026-07-17 16:32:20 +08:00
```
---
## Daily use
```bash
2026-07-17 16:45:10 +08:00
grok # Grok + bottom HUD
2026-07-17 16:32:20 +08:00
GROK_NO_HUD = 1 grok -p "hi" # bare CLI
grok-hud status
grok-hud settings # language / preset / rows
2026-07-17 16:45:10 +08:00
grok-hud lang en| zh| tw
grok-build-hud --preset full| essential| minimal
grok-build-hud --theme auto
2026-07-17 16:32:20 +08:00
grok-hud stop
```
2026-07-17 16:45:10 +08:00
In-session (plugin enabled): `/hud` `/status` `/quota` `/preset` `/settings` `/setup` `/watch`
Each Terminal tab gets an **independent** Grok session.
---
## Plugin layout
```text
plugin.json # manifest
.grok-plugin/ # local marketplace metadata
commands/ # slash commands
skills/grok-build-hud/ # agent skill
hooks/hooks.json # session hooks
bin/ + src/ # CLI + HUD runtime
scripts/install.sh # one-shot installer
```
2026-07-17 16:32:20 +08:00
---
## Configuration
`~/.grok/hud/config.json`
| Preset | Rows | Contents |
|--------|------|----------|
| **full** (default) | 3 | All fields |
| **essential** | 2 | Model/git + context/usage + activity |
| **minimal** | 1 | Dense single row |
`language` : `zh-Hans` (default) / `en` / `zh-Hant`
2026-07-17 16:45:10 +08:00
Theme always tracks Grok `/theme` unless `GROK_HUD_LOCK=1` .
2026-07-17 16:32:20 +08:00
---
## How it works
2026-07-17 16:45:10 +08:00
Reads local `~/.grok/sessions/**` , uses existing Grok auth for billing, writes under `~/.grok/hud/` , displays via same-window tmux. Does **not** upload your code.
2026-07-17 16:32:20 +08:00
---
## Uninstall
```bash
grok-build-hud --uninstall-dashboard
grok-build-hud --uninstall-hooks
2026-07-17 16:45:10 +08:00
grok plugin uninstall grok-build-hud
2026-07-17 16:32:20 +08:00
npm unlink -g grok-build-hud
```
---
## Develop
```bash
npm install
npm test
2026-07-17 16:45:10 +08:00
npm run plugin:validate
2026-07-17 16:32:20 +08:00
```
Primary documentation is **Chinese** ([README.md ](./README.md )). Commit messages in English.
## License
MIT. Unofficial third-party tool; not affiliated with xAI.