tokenjuice banner # tokenjuice πŸ§ƒ lean output compaction for terminal-heavy agent workflows. tokenjuice runs noisy commands and returns smaller, deterministic output to your agent. JSON rules summarize listings, test output, build logs, and other terminal output. The same core powers the CLI and host integrations. ## install Requires **Node.js 22 or newer**. ```bash npm install -g tokenjuice tokenjuice --version tokenjuice wrap -- git status ``` Other package managers: ```bash pnpm add -g tokenjuice yarn global add tokenjuice ``` For Homebrew: ```bash brew tap vincentkoc/tap brew install tokenjuice ``` See [distribution](docs/distribution.md) for release artifacts and Linux packages. ## host integrations The catalog below covers CLI and editor harnesses, desktop clients, instruction formats, and framework adapters. Each name links to its setup guide. **Pre-tool wrapping** rewrites commands before execution; **result replacement** compacts captured output; **guidance** asks the agent to call `tokenjuice wrap` and is not automatic. Manual imports, retired hooks, and experimental routes are marked separately. Support varies by host and version. The [support matrix](docs/adapter-support-matrix.md) records native acceptance and remaining gaps; the [verification inventory](docs/verification-inventory.md) covers every installer target and alias. A passing doctor check confirms managed configuration, not host loading or model-visible output. ### harness and framework catalog | Logo | Harness / client / framework | Integration | Setup | Configuration / limits | | --- | --- | --- | --- | --- | | AdaL CLI | [AdaL CLI](docs/adal-integration.md) | Guidance | `tokenjuice install adal` | `AGENTS.md` | | Aether | [Aether](docs/aether-integration.md) | Guidance | `tokenjuice install aether` | `.aether/tokenjuice.md` / `.aether/settings.json` | | Agent Layer | [Agent Layer](docs/agent-layer-integration.md) | Guidance | `tokenjuice install agent-layer` | `.agent-layer/instructions/tokenjuice.md`; run `al sync` after install or uninstall | | β€” | [AgentInit](docs/agentinit-integration.md) | Guidance | `tokenjuice install agentinit` | `AGENTS.md`; run `agentinit sync` after install or uninstall | | Agentlink | [Agentlink](docs/agentlink-integration.md) | Guidance | `tokenjuice install agentlink` | `AGENTS.md`; run `agentlink sync` after install or uninstall | | Agentloom | [Agentloom](docs/agentloom-integration.md) | Guidance | `tokenjuice install agentloom` | `.agents/rules/tokenjuice-agentloom.md`; run `agentloom sync` after install or uninstall | | agents-cli | [agents-cli](docs/agents-cli-integration.md) | Guidance | `tokenjuice install agents-cli` | `~/.agents/memory/AGENTS.md`; run `agents sync` after install or uninstall | | agents.ge | [agents.ge](docs/agentsge-integration.md) | Guidance | `tokenjuice install agentsge` | `.agents/rules/tokenjuice-agentsge.md` | | AGENTS.md | [AGENTS.md](docs/agents-md-integration.md) | Guidance | `tokenjuice install agents-md` | `AGENTS.md` | | AgentsMesh | [AgentsMesh](docs/agentsmesh-integration.md) | Guidance | `tokenjuice install agentsmesh` | `.agentsmesh/rules/tokenjuice.md`; run `agentsmesh generate` after install or uninstall | | β€” | [AI Memory Protocol](docs/ai-memory-protocol-integration.md) | Guidance | `tokenjuice install ai-memory-protocol` | `.memories/memory/preferences.rst` | | β€” | [ZCode](docs/zcode-integration.md) | Pre-tool wrapping | `tokenjuice install zcode` | User `~/.zcode/cli/config.json`; native agent fixture | | aictl | [aictl](docs/aictl-integration.md) | Guidance | `tokenjuice install aictl` | `AICTL.md` | | Aider | [Aider](docs/aider-integration.md) | Guidance | `tokenjuice install aider` | `CONVENTIONS.tokenjuice.md` | | β€” | [Alma](docs/alma-integration.md) | Native pre-tool plugin | Copy `dist/hosts/alma/bundle/` into Alma’s plugin directory | Foreground Bash wrapping. Verified on Linux Alma Server 0.4.1176. | | Amazon Q Developer CLI / Kiro compatibility | [Amazon Q Developer CLI / Kiro compatibility](docs/amazon-q-integration.md) | Guidance | `tokenjuice install amazon-q` | `.amazonq/rules/tokenjuice.md` | | Amp | [Amp](docs/amp-integration.md) | Guidance | `tokenjuice install amp` | `AGENTS.md` / `AGENT.md` / `CLAUDE.md` | | Antigma Ante | [Antigma Ante](docs/ante-integration.md) | Guidance | `tokenjuice install ante` | project `AGENTS.md` or `CLAUDE.md` | | anywhere-agents | [anywhere-agents](docs/anywhere-agents-integration.md) | Guidance | `tokenjuice install anywhere-agents` | `AGENTS.local.md`; run `anywhere-agents` after install or uninstall | | β€” | [AtomCode](docs/atomcode-integration.md) | Guidance skill | `tokenjuice install atomcode` | Project `.atomcode/skills/tokenjuice/SKILL.md` | | Augment | [Augment](docs/augment-integration.md) | Guidance | `tokenjuice install augment` | `.augment/rules/tokenjuice.md` | | AutoClaw | [AutoClaw](docs/autoclaw-integration.md) | Manual skill setup | Create a custom skill using the [workflow](packaging/skills/autoclaw/tokenjuice-instructions.md) | Select the skill in a fresh conversation; execution unqualified | | Avante.nvim | [Avante.nvim](docs/avante-integration.md) | Guidance | `tokenjuice install avante` | `avante.md` | | Baz | [Baz](docs/baz-integration.md) | Guidance | `tokenjuice install baz` | `.baz/skills/tokenjuice/SKILL.md` | | Bito | [Bito](docs/bito-integration.md) | Guidance | `tokenjuice install bito` | `.bito.yaml` / `.bito/tokenjuice.md` | | Blackbox CLI | [Blackbox CLI](docs/blackbox-integration.md) | Guidance | `tokenjuice install blackbox` | `.blackbox/skills/tokenjuice/SKILL.md` | | Blocks | [Blocks](docs/blocks-integration.md) | Guidance | `tokenjuice install blocks` | `.agents/skills/tokenjuice-blocks/SKILL.md` | | Builder | [Builder](docs/builder-integration.md) | Guidance | `tokenjuice install builder` | `.builder/rules/tokenjuice.mdc` | | Charlie | [Charlie](docs/charlie-integration.md) | Guidance | `tokenjuice install charlie` | `AGENTS.md` | | Claude Code | [Claude Code](docs/spec.md#install-doctor-and-uninstall) | Pre-tool wrapping | `tokenjuice install claude-code` | `~/.claude/settings.json` | | Clawdbot | [Clawdbot](docs/clawdbot-integration.md) | Guidance | `tokenjuice install clawdbot` | `skills/tokenjuice/SKILL.md` | | Cline | [Cline](docs/cline-integration.md) | Pre-tool wrapping | `tokenjuice install cline` | `~/.cline/hooks/PreToolUse`; native CLI 3.0.74 input wrapping | | CodeAnt | [CodeAnt](docs/codeant-integration.md) | Guidance | `tokenjuice install codeant` | `.codeant/instructions.json` | | CodeBuddy | [CodeBuddy](docs/codebuddy-integration.md) | Pre-tool wrapping | `tokenjuice install codebuddy` | `~/.codebuddy/settings.json` | | Codebuff | [Codebuff](docs/codebuff-integration.md) | Guidance | `tokenjuice install codebuff` | `AGENTS.md` | | Codegen | [Codegen](docs/codegen-integration.md) | Guidance | `tokenjuice install codegen` | `AGENTS.md` | | Coder Agents | [Coder Agents](docs/coder-agents-integration.md) | Guidance | `tokenjuice install coder-agents` | `.agents/skills/tokenjuice/SKILL.md` | | CodeRabbit | [CodeRabbit](docs/coderabbit-integration.md) | Guidance | `tokenjuice install coderabbit` | `.coderabbit.yaml` | | Codex CLI | [Codex CLI](docs/codex-integration.md) | Explicit wrapping | `tokenjuice wrap -- ` | Native 0.166.0 hooks lack exit status; automatic compaction stays off | | Command Code | [Command Code](docs/command-code-integration.md) | Explicit wrapping | `tokenjuice wrap -- ` | Additive hook retired; scoped legacy cleanup remains available | | β€” | [Community Grok CLI](docs/grok-cli-integration.md) | Explicit wrapping | `tokenjuice wrap -- ` | [Automatic hook retired](docs/grok-cli-integration.md) | | Continue | [Continue](docs/continue-integration.md) | Guidance | `tokenjuice install continue` | `.continue/rules/tokenjuice.md` | | β€” | [Craft Agents](docs/craft-agents-integration.md) | Guidance skill | `tokenjuice install craft-agents ` | Selected workspace `skills/tokenjuice/SKILL.md`; explicit selection required | | Crush | [Crush](docs/crush-integration.md) | Guidance | `tokenjuice install crush` | `.crush/skills/tokenjuice/SKILL.md` | | Cursor | [Cursor](docs/cursor-integration.md) | Pre-tool wrapping | `tokenjuice install cursor` | `~/.cursor/hooks.json` | | Deep Agents Code | [Deep Agents Code](docs/deepagents-integration.md) | Guidance | `tokenjuice install deepagents` | `.deepagents/AGENTS.md` | | DeepSeek Harness | [DeepSeek Harness](docs/deepseek-harness-integration.md) | Native plugin | `dsh plugin --profile PROFILE add ` | Use the packaged `dist/hosts/deepseek-harness/bundle`; PTC requires explicit wrapping | | β€” | [DevEco Code](docs/deveco-integration.md) | Result replacement | `tokenjuice install deveco` | beta native Bash plugin; released-host acceptance pending | | Devin for Terminal | [Devin for Terminal](docs/devin-integration.md) | Pre-tool wrapping | `tokenjuice install devin` | `.devin/hooks.v1.json` | | Docker Agent | [Docker Agent](docs/docker-agent-integration.md) | Guidance | `tokenjuice install docker-agent` | `.docker-agent/tokenjuice.md` | | dot-agents | [dot-agents](docs/dot-agents-integration.md) | Guidance | `tokenjuice install dot-agents` | `~/.agents/rules/global/rules.mdc`; run `dot-agents sync` after install or uninstall | | Doubao Work | [Doubao Work](docs/doubao-work-integration.md) | Manual skill import | Import the packaged [Doubao Work skill](packaging/skills/doubao-work/tokenjuice/SKILL.md) | Personal file/folder import; native execution unqualified | | Droid (Factory CLI) | [Droid (Factory CLI)](docs/droid-integration.md) | Pre-tool wrapping | `tokenjuice install droid` | `~/.factory/hooks.json` or legacy settings | | β€” | [Empryo / SoulForge](docs/empryo-integration.md) | Pre-tool wrapping | `tokenjuice install empryo` (alias `soulforge`) | Project `.soulforge/config.json`; native 2.20.25 tested with [output limits](docs/empryo-integration.md#native-acceptance-and-limits) | | ECA | [ECA](docs/eca-integration.md) | Guidance | `tokenjuice install eca` | `.eca/skills/tokenjuice/SKILL.md` | | Elyra | [Elyra](docs/elyra-integration.md) | Guidance | `tokenjuice install elyra` | `.elyra/skills/tokenjuice/SKILL.md` | | FastMCP | [FastMCP](docs/framework-integrations.md#fastmcp) | Python middleware | `pip install 'tokenjuice-integrations[fastmcp]'` | Add `TokenjuiceMiddleware` to the server or proxy; routed MCP traffic only | | Firebase Studio | [Firebase Studio](docs/firebase-studio-integration.md) | Guidance | `tokenjuice install firebase-studio` | `.idx/airules.md` | | ForgeCode | [ForgeCode](docs/forgecode-integration.md) | Guidance | `tokenjuice install forgecode` | `AGENTS.md` | | β€” | [fx](docs/fx-integration.md) | Guidance | `tokenjuice install fx` | Project `AGENTS.md`; set `FX_PROJECT_DIR` for another workspace | | Gemini CLI | [Gemini CLI](docs/gemini-cli-integration.md) | Pre-tool wrapping | `tokenjuice install gemini-cli` | `~/.gemini/settings.json`; `BeforeTool` command wrapping | | GitHub Copilot CLI | [GitHub Copilot CLI](docs/copilot-cli-integration.md) | Result replacement | `tokenjuice install copilot-cli` | native Bash replacement; [1.0.105 acceptance](docs/copilot-cli-integration.md) | | GitHub Copilot coding agent | [GitHub Copilot coding agent](docs/copilot-agent-integration.md) | Result replacement | `tokenjuice install copilot-agent` | `.github/hooks/tokenjuice-agent.json` | | GitHub Copilot SDK | [GitHub Copilot SDK](docs/framework-integrations.md#github-copilot-sdk) | SDK result hook | `createCopilotSdkHooks()` from `tokenjuice/copilot-sdk` | Compose with application `onPostToolUse` hooks; successful Bash results only | | GitLab Duo Agent Platform | [GitLab Duo Agent Platform](docs/gitlab-duo-integration.md) | Guidance | `tokenjuice install gitlab-duo` | `.gitlab/duo/chat-rules.md` | | Google Antigravity | [Google Antigravity](docs/antigravity-integration.md) | Guidance | `tokenjuice install antigravity` | `.agents/rules/tokenjuice.md` | | Goose | [Goose](docs/goose-integration.md) | Guidance | `tokenjuice install goose` | `.goosehints` | | gptme | [gptme](docs/gptme-integration.md) | Guidance | `tokenjuice install gptme` | `AGENTS.md` | | Greptile | [Greptile](docs/greptile-integration.md) | Guidance | `tokenjuice install greptile` | `.greptile/rules.md` | | Grok Bot | [Grok Bot](docs/grok-bot-integration.md) | Experimental guidance | `tokenjuice install grok-bot` | experimental local rule; [cloud skill workflow](docs/grok-bot-integration.md) | | Grok Build | [Grok Build](docs/grok-build-integration.md) | Guidance | `tokenjuice install grok-build` | `AGENTS.md` | | Hermes | [Hermes](docs/framework-integrations.md#hermes) | Native plugin | Copy the packaged bundle, then `hermes plugins enable tokenjuice` | Native user-plugin directory; `transform_terminal_output` | | IBM Bob Shell | [IBM Bob Shell](docs/bob-integration.md) | Guidance | `tokenjuice install bob` | `AGENTS.md` | | Jean2 | [Jean2](docs/jean2-integration.md) | Guidance | `tokenjuice install jean2` | `AGENTS.md` | | JetBrains AI Assistant | [JetBrains AI Assistant](docs/jetbrains-ai-integration.md) | Guidance | `tokenjuice install jetbrains-ai` | `.aiassistant/rules/tokenjuice.md` | | Jules | [Jules](docs/jules-integration.md) | Guidance | `tokenjuice install jules` | `AGENTS.md` | | Junie | [Junie](docs/junie-integration.md) | Guidance | `tokenjuice install junie` | `.junie/AGENTS.md` | | Kilo Code | [Kilo Code](docs/kilo-integration.md) | Guidance | `tokenjuice install kilo` | `kilo.jsonc` or `.kilo/kilo.jsonc` + `.kilo/rules/tokenjuice.md` | | Kimi Code CLI | [Kimi Code CLI](docs/kimi-integration.md) | Explicit wrapping | `tokenjuice wrap -- ` | [Automatic hook retired](docs/kimi-integration.md) | | Kiro | [Kiro](docs/kiro-integration.md) | Guidance | `tokenjuice install kiro` | `.kiro/steering/tokenjuice.md` | | Knowns | [Knowns](docs/knowns-integration.md) | Guidance | `tokenjuice install knowns` | `KNOWNS.md` | | LangChain | [LangChain](docs/framework-integrations.md#langchain) | Python middleware | `pip install 'tokenjuice-integrations[langchain]'` | Add `TokenjuiceMiddleware` with an explicit shell-result decoder | | β€” | [LeanCTL](docs/leanctl-integration.md) | Guidance | `tokenjuice install leanctl` | `.leanctl/instructions.md` | | LocalCode | [LocalCode](docs/localcode-integration.md) | On-demand tool (beta) | `tokenjuice install localcode` | `~/.localcode/plugins/tokenjuice/` | | Mastra | [Mastra](docs/framework-integrations.md#mastra) | Output processor | `createMastraProcessor()` from `tokenjuice/mastra` | Add to `outputProcessors` with application decoder/replacement callbacks | | mcp-agent | [mcp-agent](docs/mcp-agent-integration.md) | Guidance | `tokenjuice install mcp-agent` | `.mcp-agent/agents/tokenjuice.md` | | β€” | [miniQ](docs/miniq-integration.md) | Guidance skill | `tokenjuice install miniq` | Project `.miniq/skills`; live discovery and execution unverified | | mini-SWE-agent | [mini-SWE-agent](docs/mini-swe-agent-integration.md) | Guidance | `tokenjuice install mini-swe-agent` | `.mini-swe-agent/tokenjuice.yaml` | | β€” | [MiniMax Code](docs/minimax-code-integration.md) | Native plugin / pre-tool wrapping | Copy the packaged plugin into the active local catalog, then `mcode plugin enable tokenjuice@local` | Foreground Bash; native loading and model delivery unqualified | | β€” | [MiMo Code](docs/mimo-code-integration.md) | Result replacement (beta) | `tokenjuice install mimo-code` | Native file hook; Linux x64 CLI `0.1.17` verified | | Mistral Vibe | [Mistral Vibe](docs/mistral-vibe-integration.md) | Guidance | `tokenjuice install mistral-vibe` | `AGENTS.md` | | β€” | [Muse Code](docs/muse-code-integration.md) | Guidance | `tokenjuice install muse-code` | project skill at `.agents/skills/tokenjuice/SKILL.md`; native discovery pending | | Mux / Xum | [Mux / Xum](docs/mux-integration.md) | Explicit wrapping | `tokenjuice wrap -- ` | [Automatic hook retired](docs/mux-integration.md) | | β€” | [nanobot](docs/nanobot-integration.md) | Guidance | `tokenjuice install nanobot` | `/skills/tokenjuice/SKILL.md`; set `NANOBOT_WORKSPACE` for custom workspaces | | β€” | [NovaKit CLI](docs/novakit-integration.md) | Guidance | `tokenjuice install novakit` | `NOVAKIT.md` | | β€” | [Snow CLI](docs/snow-cli-integration.md) | Result replacement (beta) | `tokenjuice install snow-cli` | Native `afterToolCall`; Snow 0.9.15 local headless acceptance passed | | β€” | [Paimon](docs/paimon-integration.md) | Guidance skill | `tokenjuice install paimon` | Native user skills; live acceptance pending | | β€” | [Mister Morph](docs/mister-morph-integration.md) | Guidance skill | `tokenjuice install mister-morph` | Native user skills; live acceptance pending | | β€” | [Shelley](docs/shelley-integration.md) | Guidance skill | `tokenjuice install shelley` | Native user skills; live acceptance pending | | Ona Agent | [Ona Agent](docs/ona-integration.md) | Guidance | `tokenjuice install ona` | `.ona/skills/tokenjuice/SKILL.md` | | Open Interpreter | [Open Interpreter](docs/open-interpreter-integration.md) | Guidance | `tokenjuice install open-interpreter` | `AGENTS.md` | | Open WebUI | [Open WebUI](docs/openwebui-integration.md) | Manual tool import (beta) | `tokenjuice install openwebui` | `.openwebui/tools/tokenjuice_compact.py`; then import in Workspace Tools | | OpenClaw | [OpenClaw](https://docs.openclaw.ai/tools/tokenjuice) | External plugin | `openclaw plugins install @openclaw/tokenjuice` | `~/.openclaw/openclaw.json`; enable plugin and restart Gateway (see below) | | OpenCode V1 | [OpenCode V1](docs/spec.md#install-doctor-and-uninstall) | Result replacement | `tokenjuice install opencode` | `~/.config/opencode/plugins/tokenjuice.js` | | OpenCode V2 | [OpenCode V2](docs/opencode-v2-integration.md) | Result replacement | `tokenjuice install opencode-v2` | foreground `shell` result replacement; native v2.0.18 acceptance | | β€” | [oh-my-pi (omp)](docs/omp-integration.md) | Native package extension | `omp plugin install tokenjuice` | Successful foreground Bash content; native 18.20.0 model-request acceptance | | β€” | [OpenHanako / HanaAgent](docs/openhanako-integration.md) | Native result plugin | Copy `dist/hosts/openhanako/bundle/` into Hana’s plugin directory | Completed successful `exec_command`; Linux app-core v0.450.0 verified; desktop/PTY unverified | | OpenHands | [OpenHands](docs/openhands-integration.md) | Explicit wrapping | `tokenjuice wrap -- ` | Manual wrapping; [legacy hook cleanup](docs/openhands-integration.md) | | β€” | [OmO](docs/omo-integration.md) | Result replacement | `tokenjuice install omo` | Native OmO 5.1.70 root Bash results; exact/raw/failure preserved | | pi | [pi](docs/spec.md#install-doctor-and-uninstall) | Result replacement | `tokenjuice install pi` | `~/.pi/agent/extensions/tokenjuice.js` | | β€” | [pi-go](docs/pi-go-integration.md) | Guidance | `tokenjuice install pi-go` | `.pi/skills/tokenjuice/SKILL.md` | | Plandex | [Plandex](docs/plandex-integration.md) | Guidance | `tokenjuice install plandex` | `PLANDEX.tokenjuice.md` | | QClaw | [QClaw](docs/qclaw-migration.md) | Migration only | Follow the WorkBuddy migration guide | No QClaw hook installer; qualify WorkBuddy separately | | Qoder (guidance) | [Qoder (guidance)](docs/qoder-integration.md) | Guidance | `tokenjuice install qoder` | `AGENTS.md`; use `qoder-cli` for the replacement hook | | Qoder CLI | [Qoder CLI](docs/qoder-integration.md) | Result replacement | `tokenjuice install qoder-cli` | Native `PostToolUse`; separate from Qoder guidance below | | QoderWork skills | [QoderWork skills](docs/qoderwork-integration.md) | Guidance | `tokenjuice install qoderwork` | guidance skill at `~/.qoderwork/skills/tokenjuice/SKILL.md` | | β€” | [QwenPaw](docs/qwenpaw-integration.md) | Workspace skill guidance | Import the [packaged skill](packaging/skills/qwenpaw/tokenjuice/SKILL.md) with QwenPaw's `--agent-id` | Explicit workspace selection; native import and command execution unqualified | | Qodo Code Review | [Qodo Code Review](docs/qodo-integration.md) | Guidance | `tokenjuice install qodo` | `.pr_agent.toml` | | Qwen Code | [Qwen Code](docs/qwen-code-integration.md) | Pre-tool wrapping | `tokenjuice install qwen-code` | `.qwen/settings.json` | | QwenWork | [QwenWork](docs/qwenwork-integration.md) | Guidance | `tokenjuice install qwenwork` | guidance skill at `~/.qwenwork/skills/tokenjuice/SKILL.md` | | Replit Agent | [Replit Agent](docs/replit-integration.md) | Guidance | `tokenjuice install replit` | `replit.md` | | Roo Code | [Roo Code](docs/roo-integration.md) | Guidance | `tokenjuice install roo` | `.roo/rules/tokenjuice.md` | | Rovo Dev CLI | [Rovo Dev CLI](docs/rovo-integration.md) | Guidance | `tokenjuice install rovo` | `AGENTS.md` | | β€” | [Ruler](docs/ruler-integration.md) | Guidance | `tokenjuice install ruler` | `.ruler/tokenjuice.md` | | Stagewise | [Stagewise](docs/stagewise-integration.md) | Guidance | `tokenjuice install stagewise` | `.stagewise/skills/tokenjuice/SKILL.md` | | SWE-agent | [SWE-agent](docs/swe-agent-integration.md) | Guidance | `tokenjuice install swe-agent` | `.swe-agent/tokenjuice.yaml` | | T3 Code | [T3 Code](docs/t3-code-integration.md) | Provider integration | Configure the selected Codex, Claude Code or OpenCode provider | Install on the machine executing tools; no separate T3 installer | | Tabby | [Tabby](docs/tabby-integration.md) | Guidance | `tokenjuice install tabby` | `~/.tabby/config.toml` | | Tabnine CLI | [Tabnine CLI](docs/tabnine-integration.md) | Guidance | `tokenjuice install tabnine` | `TABNINE.md` | | Trae | [Trae](docs/trae-integration.md) | Guidance | `tokenjuice install trae` | `.trae/rules/project_rules.md` | | UiPath for Coding Agents | [UiPath for Coding Agents](docs/uipath-integration.md) | Guidance | `tokenjuice install uipath` | `AGENTS.md` | | VS Code Copilot Chat (Local) | [VS Code Copilot Chat (Local)](docs/vscode-copilot-integration.md) | Pre-tool wrapping | `tokenjuice install vscode-copilot` | `~/.copilot/hooks/tokenjuice-vscode.json` | | Warp | [Warp](docs/warp-integration.md) | Guidance | `tokenjuice install warp` | `AGENTS.md` / `WARP.md` | | Windsurf | [Windsurf](docs/windsurf-integration.md) | Guidance | `tokenjuice install windsurf` | `.windsurf/rules/tokenjuice.md` | | WorkBuddy | [WorkBuddy](docs/workbuddy-integration.md) | Manual skill import | Import the packaged [WorkBuddy skill](packaging/skills/workbuddy/tokenjuice/SKILL.md) | Desktop import and execution unqualified; separate from CodeBuddy CLI | | Zed | [Zed](docs/zed-integration.md) | Guidance | `tokenjuice install zed` | `.rules` | | Zencoder | [Zencoder](docs/zencoder-integration.md) | Guidance | `tokenjuice install zencoder` | `.zencoder/rules/tokenjuice.md` | Logos use locally stored, padded tiles for light and dark themes. A dash means no verified project mark is available; see [logo sources and standards](docs/logos/README.md). ### installation notes For example, Claude Code uses pre-tool command wrapping: ```bash tokenjuice install claude-code tokenjuice doctor claude-code ``` Restart the host or start a fresh session as its guide requires. A successful doctor check confirms managed configuration. It does not prove that the host loaded it or delivered compacted output. Use `tokenjuice uninstall claude-code` to remove tokenjuice's managed wiring. OpenClaw uses the external `@openclaw/tokenjuice` plugin: ```bash openclaw plugins install @openclaw/tokenjuice openclaw config set plugins.entries.tokenjuice.enabled true openclaw gateway restart ``` Match the plugin to your OpenClaw version. See the [OpenClaw guide](https://docs.openclaw.ai/tools/tokenjuice) for host compatibility. The OpenClaw adapter compacts shell results, not Code Mode JavaScript results. Code Mode inputs carrying `code` pass through unchanged, even when OpenClaw also supplies that JavaScript in a `command` alias. Genuine shell `command` inputs still use the normal compaction and inspection-output protections. ## commands ```bash tokenjuice --help tokenjuice reduce build.log tokenjuice reduce-json result.json tokenjuice wrap -- pnpm test tokenjuice wrap --keep-failures -- pnpm test tokenjuice wrap --raw -- git status tokenjuice wrap --store -- pnpm test tokenjuice doctor hooks tokenjuice stats --timezone utc tokenjuice verify --fixtures tokenjuice discover ``` `reduce` compacts existing text. `wrap` runs a command and compacts its observed output. `reduce-json` provides the machine protocol for adapters. See the [spec](docs/spec.md) for options, JSON envelopes, rules, and storage behavior. ## output and storage Host integrations preserve exact file reads and apply their documented compaction policy to eligible output. Use `--keep-failures` to preserve failed commands' stdout, stderr, and exit status within the capture limit. Automatic pre-tool wrappers enable this option. `--raw` and its alias `--full` bypass reduction. They still obey the capture limit, which defaults to `4mb`. Increase `--max-capture-bytes` when you need a larger capture. Raw artifact storage is opt-in through `--store`. The Pi extension is the exception: it stores the raw bytes of every rewrite for retrieval with `tokenjuice cat `. Set `TOKENJUICE_ARTIFACT_DIR` to choose the artifact directory. Statistics use bounded metadata segments. `tokenjuice stats --limit 1000` reports partial coverage and a cursor for the next page. Set `TOKENJUICE_STATS=off` or pass `--no-stats` to disable metadata and hook-debug telemetry writes. Rules load from built-ins, `~/.config/tokenjuice/rules`, and `.tokenjuice/rules`. Later layers override earlier rules by ID. See [rule authoring](docs/rules.md). ## docs - [documentation index](docs/README.md) β€” all integration guides and reference pages - [harness and framework catalog](#harness-and-framework-catalog) β€” setup routes and configuration locations - [support and verification](docs/adapter-support-matrix.md) β€” evidence and acceptance limits - [spec](docs/spec.md) β€” CLI, adapter protocol, compaction, and storage - [contributing](CONTRIBUTING.md) β€” development and validation - [security](SECURITY.md) β€” private vulnerability reporting πŸ’™ built by [Vincent Koc](https://github.com/vincentkoc).