Release v0.3.11: position repo as Grok plugin with clearer install

Document plugin-first packaging (manifest, commands, skills, hooks) and
have install.sh build the CLI, install the tmux dashboard, and register
the plugin so clone-and-setup matches how the project is shipped.
This commit is contained in:
2026-07-17 16:45:10 +08:00
parent e32e0df209
commit 5b35551434
11 changed files with 344 additions and 113 deletions
+85 -23
View File
@@ -1,8 +1,8 @@
# grok-hud
# grok-build-hud
**Live multi-line status strip for [Grok Build](https://x.ai/cli)**
**Live multi-line status strip for [Grok Build](https://x.ai/cli) — shipped as a Grok plugin**
> 中文文档(主 README):[README.md](./README.md)
> Primary docs (Chinese): [README.md](./README.md)
Always-on strip at the bottom of the **same Terminal tab** (tmux status — not a second window):
@@ -22,19 +22,34 @@ ctx ██████░░░░ 50% (252k/500k) · i … o … c 99% · use 2
| Multi-terminal | Independent session per tab |
| Language | Default **简体中文**; English / 繁體 available |
Repo: http://172.238.15.154:3000/Redredchen01/grok-hud
Repo: http://172.238.15.154:3000/Redredchen01/grok-hud
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.
---
## Requirements
- Node.js 18+
- Grok Build CLI + `grok login`
- Node.js 18+ and npm
- tmux (`brew install tmux` on macOS)
- Grok Build signed in (`grok login`)
---
## Install
## Install (recommended)
One script: **build CLI → install tmux HUD → register as Grok plugin**.
```bash
git clone http://172.238.15.154:3000/Redredchen01/grok-hud.git
@@ -42,21 +57,17 @@ cd grok-hud
bash scripts/install.sh
```
Or:
Then:
```bash
npm install && npm run build && npm link
npm run install-local
grok # Grok + bottom HUD (same tab)
grok-hud status
grok-hud settings
```
Optional plugin:
Reload hooks in Grok: `/hooks` then `r` if needed.
```bash
grok plugin install . --trust
grok plugin enable grok-build-hud
```
PATH (if commands missing):
### PATH (if commands missing)
```bash
export PATH="$(npm prefix -g)/bin:$HOME/.local/bin:$PATH"
@@ -64,20 +75,67 @@ export PATH="$(npm prefix -g)/bin:$HOME/.local/bin:$PATH"
---
## Install pieces
### CLI + same-window strip only
```bash
npm install && npm run build && npm link
npm run install-local
```
### Register as Grok plugin (slash commands + skill + hooks)
Build first (`dist/` is required by hooks):
```bash
npm install && npm run build
grok plugin install . --trust
grok plugin enable grok-build-hud
grok plugin validate .
```
> Plugin-only install gives `/hud` etc. and scrollback annotations, **not** the multi-line tmux bar. Use `install.sh` for the full experience.
### Update
```bash
git pull && bash scripts/install.sh
# or: grok plugin update grok-build-hud
```
---
## Daily use
```bash
grok # Grok + bottom HUD (same tab)
grok # Grok + bottom HUD
GROK_NO_HUD=1 grok -p "hi" # bare CLI
grok-hud status
grok-hud settings # language / preset / rows
grok-hud lang en # English labels
grok-hud lang zh # 简体中文 (default)
grok-build-hud --theme auto # follow Grok theme
grok-hud lang en|zh|tw
grok-build-hud --preset full|essential|minimal
grok-build-hud --theme auto
grok-hud stop
```
Each Terminal tab gets an **independent** Grok session (unique tmux name).
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
```
---
@@ -93,11 +151,13 @@ Each Terminal tab gets an **independent** Grok session (unique tmux name).
`language`: `zh-Hans` (default) / `en` / `zh-Hant`
Theme always tracks Grok `/theme` unless `GROK_HUD_LOCK=1`.
---
## How it works
Reads local `~/.grok/sessions/**`, uses existing Grok auth for billing, writes status files under `~/.grok/hud/`, displays via same-window tmux. Does **not** upload your code.
Reads local `~/.grok/sessions/**`, uses existing Grok auth for billing, writes under `~/.grok/hud/`, displays via same-window tmux. Does **not** upload your code.
---
@@ -106,6 +166,7 @@ Reads local `~/.grok/sessions/**`, uses existing Grok auth for billing, writes s
```bash
grok-build-hud --uninstall-dashboard
grok-build-hud --uninstall-hooks
grok plugin uninstall grok-build-hud
npm unlink -g grok-build-hud
```
@@ -116,6 +177,7 @@ npm unlink -g grok-build-hud
```bash
npm install
npm test
npm run plugin:validate
```
Primary documentation is **Chinese** ([README.md](./README.md)). Commit messages in English.