Simplify hook install: use precompiled binary directly
This commit is contained in:
12
README.md
12
README.md
@@ -14,17 +14,9 @@ cp claudeplus/commands/* ~/.claude/commands/
|
||||
|
||||
### 安装 Stop Hook(token 用量自动备份)
|
||||
|
||||
需要先安装 Go:
|
||||
|
||||
```bash
|
||||
sudo apt install golang-go -y
|
||||
```
|
||||
|
||||
编译并配置:
|
||||
|
||||
```bash
|
||||
cd claudeplus/hooks/token-stats-hook
|
||||
go build -o ~/.claude/token-stats-hook-bin .
|
||||
cp claudeplus/hooks/token-stats-hook/token-stats-hook-bin ~/.claude/token-stats-hook-bin
|
||||
chmod +x ~/.claude/token-stats-hook-bin
|
||||
```
|
||||
|
||||
在 `~/.claude/settings.json` 中加入以下配置(如已有其他 hooks 注意合并):
|
||||
|
||||
Reference in New Issue
Block a user