Skip to content

Commit 6c1d2ce

Browse files
authored
fix(uninstall): cover pre-tool hosts and pi
1 parent d42b89f commit 6c1d2ce

15 files changed

Lines changed: 824 additions & 29 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
- Preserve existing instruction-file `.bak` backups instead of overwriting them during install.
7575
- Preserve existing JetBrains AI Assistant `.bak` rule backups when installing over a custom rule.
7676
- Normalize stored artifact sources for Copilot, Droid, and VS Code Copilot hook adapters.
77+
- Add missing uninstall coverage for Claude Code, CodeBuddy, Cursor, and pi integrations.
7778

7879
## 0.7.1 - 2026-05-17
7980

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ then:
141141
tokenjuice --help
142142
tokenjuice --version
143143
tokenjuice install [adal|aether|aictl|ai-memory-protocol|aider|agent-layer|agentinit|agentlink|agentloom|agents-cli|agents-md|agentsge|agentsmesh|amazon-q|amp|antigravity|anywhere-agents|augment|avante|baz|bito|blackbox|blocks|clawdbot|bob|builder|charlie|codex|claude-code|cline|codeant|codebuff|codegen|coder-agents|coderabbit|codebuddy|command-code|continue|copilot-agent|crush|cursor|deepagents|devin|dot-agents|docker-agent|droid|eca|elyra|firebase-studio|forgecode|gemini-cli|gitlab-duo|goose|greptile|grok-build|grok-cli|gptme|jean2|jetbrains-ai|junie|jules|leanctl|kimi|kiro|kilo|localcode|mcp-agent|mini-swe-agent|swe-agent|stagewise|mistral-vibe|mux|novakit|knowns|ona|openhands|open-interpreter|openwebui|pi|pi-go|opencode|plandex|qodo|qoder|qwen-code|replit|roo|rovo|ruler|tabby|tabnine|trae|uipath|vscode-copilot|warp|windsurf|copilot-cli|zed|zencoder]
144-
tokenjuice uninstall [adal|aether|aictl|ai-memory-protocol|aider|agent-layer|agentinit|agentlink|agentloom|agents-cli|agents-md|agentsge|agentsmesh|amazon-q|amp|antigravity|anywhere-agents|augment|avante|baz|bito|blackbox|blocks|clawdbot|bob|builder|charlie|codex|cline|codeant|codebuff|codegen|coder-agents|coderabbit|command-code|continue|copilot-agent|crush|deepagents|devin|dot-agents|docker-agent|droid|eca|elyra|firebase-studio|forgecode|gemini-cli|gitlab-duo|goose|greptile|grok-build|grok-cli|gptme|jean2|jetbrains-ai|junie|jules|leanctl|kimi|kiro|kilo|localcode|mcp-agent|mini-swe-agent|swe-agent|stagewise|mistral-vibe|mux|novakit|knowns|ona|openhands|open-interpreter|openwebui|pi-go|opencode|plandex|qodo|qoder|qwen-code|replit|roo|rovo|ruler|tabby|tabnine|trae|uipath|vscode-copilot|warp|windsurf|copilot-cli|zed|zencoder]
144+
tokenjuice uninstall [adal|aether|aictl|ai-memory-protocol|aider|agent-layer|agentinit|agentlink|agentloom|agents-cli|agents-md|agentsge|agentsmesh|amazon-q|amp|antigravity|anywhere-agents|augment|avante|baz|bito|blackbox|blocks|clawdbot|bob|builder|charlie|codex|claude-code|cline|codeant|codebuff|codegen|coder-agents|coderabbit|codebuddy|command-code|continue|copilot-agent|crush|cursor|deepagents|devin|dot-agents|docker-agent|droid|eca|elyra|firebase-studio|forgecode|gemini-cli|gitlab-duo|goose|greptile|grok-build|grok-cli|gptme|jean2|jetbrains-ai|junie|jules|leanctl|kimi|kiro|kilo|localcode|mcp-agent|mini-swe-agent|swe-agent|stagewise|mistral-vibe|mux|novakit|knowns|ona|openhands|open-interpreter|openwebui|pi|pi-go|opencode|plandex|qodo|qoder|qwen-code|replit|roo|rovo|ruler|tabby|tabnine|trae|uipath|vscode-copilot|warp|windsurf|copilot-cli|zed|zencoder]
145145
```
146146

147147
OpenClaw support is bundled on the OpenClaw side. Do not run
@@ -165,7 +165,7 @@ tokenjuice wrap --raw -- <command> [args...]
165165
tokenjuice wrap --store -- <command> [args...]
166166
tokenjuice install [adal|aether|aictl|ai-memory-protocol|aider|agent-layer|agentinit|agentlink|agentloom|agents-cli|agents-md|agentsge|agentsmesh|amazon-q|amp|antigravity|anywhere-agents|augment|avante|baz|bito|blackbox|blocks|clawdbot|bob|builder|charlie|codex|claude-code|cline|codeant|codebuff|codegen|coder-agents|coderabbit|codebuddy|command-code|continue|copilot-agent|crush|cursor|deepagents|devin|dot-agents|docker-agent|droid|eca|elyra|firebase-studio|forgecode|gemini-cli|gitlab-duo|goose|greptile|grok-build|grok-cli|gptme|jean2|jetbrains-ai|junie|jules|leanctl|kimi|kiro|kilo|localcode|mcp-agent|mini-swe-agent|swe-agent|stagewise|mistral-vibe|mux|novakit|knowns|ona|openhands|open-interpreter|openwebui|pi|pi-go|opencode|plandex|qodo|qoder|qwen-code|replit|roo|rovo|ruler|tabby|tabnine|trae|uipath|vscode-copilot|warp|windsurf|copilot-cli|zed|zencoder]
167167
tokenjuice install [adal|aether|aictl|ai-memory-protocol|aider|agent-layer|agentinit|agentlink|agentloom|agents-cli|agents-md|agentsge|agentsmesh|amazon-q|amp|antigravity|anywhere-agents|augment|avante|baz|bito|blackbox|blocks|clawdbot|bob|builder|charlie|codex|claude-code|cline|codeant|codebuff|codegen|coder-agents|coderabbit|codebuddy|command-code|continue|copilot-agent|crush|cursor|deepagents|devin|dot-agents|docker-agent|droid|eca|elyra|firebase-studio|forgecode|gemini-cli|gitlab-duo|goose|greptile|grok-build|grok-cli|gptme|jean2|jetbrains-ai|junie|jules|leanctl|kimi|kiro|kilo|localcode|mcp-agent|mini-swe-agent|swe-agent|stagewise|mistral-vibe|mux|novakit|knowns|ona|openhands|open-interpreter|openwebui|pi|pi-go|opencode|plandex|qodo|qoder|qwen-code|replit|roo|rovo|ruler|tabby|tabnine|trae|uipath|vscode-copilot|warp|windsurf|copilot-cli|zed|zencoder] --local
168-
tokenjuice uninstall [adal|aether|aictl|ai-memory-protocol|aider|agent-layer|agentinit|agentlink|agentloom|agents-cli|agents-md|agentsge|agentsmesh|amazon-q|amp|antigravity|anywhere-agents|augment|avante|baz|bito|blackbox|blocks|clawdbot|bob|builder|charlie|codex|cline|codeant|codebuff|codegen|coder-agents|coderabbit|command-code|continue|copilot-agent|crush|deepagents|devin|dot-agents|docker-agent|droid|eca|elyra|firebase-studio|forgecode|gemini-cli|gitlab-duo|goose|greptile|grok-build|grok-cli|gptme|jean2|jetbrains-ai|junie|jules|leanctl|kimi|kiro|kilo|localcode|mcp-agent|mini-swe-agent|swe-agent|stagewise|mistral-vibe|mux|novakit|knowns|ona|openhands|open-interpreter|openwebui|pi-go|opencode|plandex|qodo|qoder|qwen-code|replit|roo|rovo|ruler|tabby|tabnine|trae|uipath|vscode-copilot|warp|windsurf|copilot-cli|zed|zencoder]
168+
tokenjuice uninstall [adal|aether|aictl|ai-memory-protocol|aider|agent-layer|agentinit|agentlink|agentloom|agents-cli|agents-md|agentsge|agentsmesh|amazon-q|amp|antigravity|anywhere-agents|augment|avante|baz|bito|blackbox|blocks|clawdbot|bob|builder|charlie|codex|claude-code|cline|codeant|codebuff|codegen|coder-agents|coderabbit|codebuddy|command-code|continue|copilot-agent|crush|cursor|deepagents|devin|dot-agents|docker-agent|droid|eca|elyra|firebase-studio|forgecode|gemini-cli|gitlab-duo|goose|greptile|grok-build|grok-cli|gptme|jean2|jetbrains-ai|junie|jules|leanctl|kimi|kiro|kilo|localcode|mcp-agent|mini-swe-agent|swe-agent|stagewise|mistral-vibe|mux|novakit|knowns|ona|openhands|open-interpreter|openwebui|pi|pi-go|opencode|plandex|qodo|qoder|qwen-code|replit|roo|rovo|ruler|tabby|tabnine|trae|uipath|vscode-copilot|warp|windsurf|copilot-cli|zed|zencoder]
169169
tokenjuice ls
170170
tokenjuice cat <artifact-id>
171171
tokenjuice verify

docs/codebuddy-integration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ inspect:
113113
pnpm build
114114
node dist/cli/main.js install codebuddy
115115
node dist/cli/main.js doctor codebuddy
116+
node dist/cli/main.js uninstall codebuddy
116117
node dist/cli/main.js wrap --format json --trace -- "$SHELL" -lc "git status --short"
117118
node dist/cli/main.js wrap --format json --trace -- pnpm --help
118119
node dist/cli/main.js wrap --format json --trace --raw -- pnpm --help
@@ -122,6 +123,7 @@ expected:
122123

123124
- `doctor codebuddy` reports `health: ok`
124125
- the hook entry in `~/.codebuddy/settings.json` has `matcher: "Bash"` and a command containing `codebuddy-pre-tool-use --wrap-launcher ...`
126+
- `uninstall codebuddy` removes tokenjuice-managed `PreToolUse` and legacy `PostToolUse` entries while preserving unrelated hooks
125127
- wrapped shell commands show nested normalized command/argv in trace
126128
- `--raw` keeps `ratio = 1`
127129
- non-raw wraps usually produce `ratio < 1`

docs/cursor-integration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ inspect:
6969
pnpm build
7070
node dist/cli/main.js install cursor
7171
node dist/cli/main.js doctor cursor
72+
node dist/cli/main.js uninstall cursor
7273
node dist/cli/main.js wrap --format json --trace -- "$SHELL" -lc "git status --short"
7374
node dist/cli/main.js wrap --format json --trace -- pnpm --help
7475
node dist/cli/main.js wrap --format json --trace --raw -- pnpm --help
@@ -77,6 +78,7 @@ node dist/cli/main.js wrap --format json --trace --raw -- pnpm --help
7778
expected:
7879

7980
- `doctor cursor` reports `health: ok`
81+
- `uninstall cursor` removes tokenjuice-managed `preToolUse` hooks while preserving unrelated hooks
8082
- wrapped shell commands show nested normalized command/argv in trace
8183
- `--raw` keeps `ratio = 1`
8284
- non-raw wraps usually produce `ratio < 1`

docs/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ supported host hooks:
446446

447447
`tokenjuice doctor hooks` inspects installed host hooks together, including the Pi extension, spots stale Cellar-pinned Homebrew commands, and points back to the right install command for repair. `tokenjuice doctor droid`, `tokenjuice doctor pi`, `tokenjuice doctor opencode`, `tokenjuice doctor openhands`, `tokenjuice doctor open-interpreter`, `tokenjuice doctor openwebui`, `tokenjuice doctor mcp-agent`, `tokenjuice doctor mini-swe-agent`, `tokenjuice doctor swe-agent`, `tokenjuice doctor docker-agent`, `tokenjuice doctor mistral-vibe`, `tokenjuice doctor mux`, `tokenjuice doctor ona`, `tokenjuice doctor plandex`, `tokenjuice doctor qodo`, `tokenjuice doctor qoder`, `tokenjuice doctor replit`, `tokenjuice doctor firebase-studio`, `tokenjuice doctor trae`, `tokenjuice doctor uipath`, `tokenjuice doctor warp`, `tokenjuice doctor grok-build`, `tokenjuice doctor grok-cli`, `tokenjuice doctor kimi`, `tokenjuice doctor qwen-code`, `tokenjuice doctor command-code`, `tokenjuice doctor continue`, `tokenjuice doctor adal`, `tokenjuice doctor ai-memory-protocol`, `tokenjuice doctor aider`, `tokenjuice doctor agent-layer`, `tokenjuice doctor agentinit`, `tokenjuice doctor agentlink`, `tokenjuice doctor agentloom`, `tokenjuice doctor agents-cli`, `tokenjuice doctor agents-md`, `tokenjuice doctor agentsge`, `tokenjuice doctor agentsmesh`, `tokenjuice doctor amazon-q`, `tokenjuice doctor amp`, `tokenjuice doctor antigravity`, `tokenjuice doctor anywhere-agents`, `tokenjuice doctor augment`, `tokenjuice doctor avante`, `tokenjuice doctor baz`, `tokenjuice doctor builder`, `tokenjuice doctor charlie`, `tokenjuice doctor codeant`, `tokenjuice doctor codegen`, `tokenjuice doctor deepagents`, `tokenjuice doctor jean2`, `tokenjuice doctor jetbrains-ai`, `tokenjuice doctor junie`, `tokenjuice doctor jules`, `tokenjuice doctor kiro`, `tokenjuice doctor kilo`, `tokenjuice doctor roo`, `tokenjuice doctor rovo`, `tokenjuice doctor ruler`, `tokenjuice doctor goose`, `tokenjuice doctor windsurf`, `tokenjuice doctor zed`, `tokenjuice doctor zencoder`, `tokenjuice doctor cline`, `tokenjuice doctor crush`, `tokenjuice doctor devin`, `tokenjuice doctor vscode-copilot`, and `tokenjuice doctor copilot-cli` are the direct per-host checks. the `--local` variant expects Codex, Claude Code, Cline, CodeBuddy, Command Code, Crush, Cursor, Devin, Droid, Gemini CLI, Grok CLI, Kimi, Mux, OpenHands, Qwen Code, VS Code Copilot, and Copilot CLI hooks to point at the current repo build instead of the installed launcher on `PATH`.
448448

449-
`tokenjuice uninstall codex` removes the tokenjuice Codex PostToolUse hook from `~/.codex/hooks.json`. once removed, `tokenjuice doctor codex` and `tokenjuice doctor hooks` report that state as `disabled` instead of treating it like a broken install. `tokenjuice uninstall opencode` removes the OpenCode plugin from `~/.config/opencode/plugins/tokenjuice.js`.
449+
`tokenjuice uninstall codex`, `tokenjuice uninstall claude-code`, `tokenjuice uninstall codebuddy`, and `tokenjuice uninstall cursor` remove only tokenjuice-managed hook entries from their host settings while preserving unrelated user hooks in the same file. `tokenjuice uninstall pi` removes the generated pi extension, restoring `tokenjuice.js.bak` when one exists and leaving custom non-tokenjuice extensions untouched. once removed, direct doctors and `tokenjuice doctor hooks` report that state as disabled instead of treating it like a broken install. `tokenjuice uninstall opencode` removes the OpenCode plugin from `~/.config/opencode/plugins/tokenjuice.js`.
450450

451451
## rule model
452452

0 commit comments

Comments
 (0)