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
+14 -4
View File
@@ -2,6 +2,10 @@
> English notes: keep commit messages in English. Primary docs are Chinese ([README.md](./README.md)); English summary: [README.en.md](./README.en.md).
## 定位
本仓库以 **Grok 插件** 形式交付(`plugin.json` + `commands/` + `skills/` + `hooks/`),运行时依赖 Node CLI + 同窗口 tmux 状态条。改文档时保持「插件优先」表述。
## 环境
```bash
@@ -9,18 +13,23 @@ git clone http://172.238.15.154:3000/Redredchen01/grok-hud.git
cd grok-hud
npm install
npm test
npm run plugin:validate # 需本机 grok CLI
```
## 目录结构
| 路径 | 作用 |
|------|------|
| `plugin.json` | Grok 插件清单 |
| `.grok-plugin/` | 本地 marketplace 元数据 |
| `commands/` | 会话斜杠命令 |
| `skills/` | Agent skill |
| `hooks/` | Session hooks |
| `src/` | TypeScript 源码(session、billing、status、tmux、theme、CLI |
| `bin/` | 入口:`grok-build-hud``grok-hud``grok-hud-run`、hook |
| `tests/` | Node 内置测试 (`node --test`) |
| `fixtures/` | 测试用 session / billing 样例 |
| `commands/` / `skills/` | Grok 插件表面 |
| `scripts/install.sh` | 一键安装 |
| `scripts/install.sh` | 一键:CLI + dashboard + 插件注册 |
| `README.md` | **中文主文档** |
| `README.en.md` | 英文简版 |
@@ -30,12 +39,13 @@ npm test
- 配额接口离线 / 未登录时**优雅降级**(渲染路径不抛错)
- HUD 保持**同窗口**tmux status),默认不另开 Terminal
- 改解析 / 渲染逻辑请补测试
- hooks 依赖 `dist/`:改 hook 路径前确认 `npm run build`
- **Commit message 用英文**;用户文档以中文为主
## 提交前
```bash
npm test
# 若改了 plugin.json / commands / skills / hooks
npm run plugin:validate
```
全部测试通过后再 push。