Simplify hook install: use precompiled binary directly

This commit is contained in:
Knowit
2026-04-18 10:07:26 +08:00
parent a9404d0fdd
commit 36310b97d9

View File

@@ -14,17 +14,9 @@ cp claudeplus/commands/* ~/.claude/commands/
### 安装 Stop Hooktoken 用量自动备份) ### 安装 Stop Hooktoken 用量自动备份)
需要先安装 Go
```bash ```bash
sudo apt install golang-go -y cp claudeplus/hooks/token-stats-hook/token-stats-hook-bin ~/.claude/token-stats-hook-bin
``` chmod +x ~/.claude/token-stats-hook-bin
编译并配置:
```bash
cd claudeplus/hooks/token-stats-hook
go build -o ~/.claude/token-stats-hook-bin .
``` ```
`~/.claude/settings.json` 中加入以下配置(如已有其他 hooks 注意合并): `~/.claude/settings.json` 中加入以下配置(如已有其他 hooks 注意合并):