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.
Requires Node.js 22 or newer.
npm install -g tokenjuice
tokenjuice --version
tokenjuice wrap -- git statusOther package managers:
pnpm add -g tokenjuice
yarn global add tokenjuiceFor Homebrew:
brew tap vincentkoc/tap
brew install tokenjuiceSee distribution for release artifacts and Linux packages.
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 records native acceptance and remaining gaps; the verification inventory covers every installer target and alias. A passing doctor check confirms managed configuration, not host loading or model-visible output.
| Logo | Harness / client / framework | Integration | Setup | Configuration / limits |
|---|---|---|---|---|
| AdaL CLI | Guidance | tokenjuice install adal |
AGENTS.md |
|
| Aether | Guidance | tokenjuice install aether |
.aether/tokenjuice.md / .aether/settings.json |
|
| Agent Layer | Guidance | tokenjuice install agent-layer |
.agent-layer/instructions/tokenjuice.md; run al sync after install or uninstall |
|
| β | AgentInit | Guidance | tokenjuice install agentinit |
AGENTS.md; run agentinit sync after install or uninstall |
| Agentlink | Guidance | tokenjuice install agentlink |
AGENTS.md; run agentlink sync after install or uninstall |
|
| Agentloom | Guidance | tokenjuice install agentloom |
.agents/rules/tokenjuice-agentloom.md; run agentloom sync after install or uninstall |
|
| agents-cli | Guidance | tokenjuice install agents-cli |
~/.agents/memory/AGENTS.md; run agents sync after install or uninstall |
|
| agents.ge | Guidance | tokenjuice install agentsge |
.agents/rules/tokenjuice-agentsge.md |
|
| AGENTS.md | Guidance | tokenjuice install agents-md |
AGENTS.md |
|
| AgentsMesh | Guidance | tokenjuice install agentsmesh |
.agentsmesh/rules/tokenjuice.md; run agentsmesh generate after install or uninstall |
|
| β | AI Memory Protocol | Guidance | tokenjuice install ai-memory-protocol |
.memories/memory/preferences.rst |
| aictl | Guidance | tokenjuice install aictl |
AICTL.md |
|
| Aider | Guidance | tokenjuice install aider |
CONVENTIONS.tokenjuice.md |
|
| Amazon Q Developer CLI / Kiro compatibility | Guidance | tokenjuice install amazon-q |
.amazonq/rules/tokenjuice.md |
|
| Amp | Guidance | tokenjuice install amp |
AGENTS.md / AGENT.md / CLAUDE.md |
|
| Antigma Ante | Guidance | tokenjuice install ante |
project AGENTS.md or CLAUDE.md |
|
| anywhere-agents | Guidance | tokenjuice install anywhere-agents |
AGENTS.local.md; run anywhere-agents after install or uninstall |
|
| Augment | Guidance | tokenjuice install augment |
.augment/rules/tokenjuice.md |
|
| AutoClaw | Manual skill setup | Create a custom skill using the workflow | Select the skill in a fresh conversation; execution unqualified | |
| Avante.nvim | Guidance | tokenjuice install avante |
avante.md |
|
| Baz | Guidance | tokenjuice install baz |
.baz/skills/tokenjuice/SKILL.md |
|
| Bito | Guidance | tokenjuice install bito |
.bito.yaml / .bito/tokenjuice.md |
|
| Blackbox CLI | Guidance | tokenjuice install blackbox |
.blackbox/skills/tokenjuice/SKILL.md |
|
| Blocks | Guidance | tokenjuice install blocks |
.agents/skills/tokenjuice-blocks/SKILL.md |
|
| Builder | Guidance | tokenjuice install builder |
.builder/rules/tokenjuice.mdc |
|
| Charlie | Guidance | tokenjuice install charlie |
AGENTS.md |
|
| Claude Code | Pre-tool wrapping | tokenjuice install claude-code |
~/.claude/settings.json |
|
| Clawdbot | Guidance | tokenjuice install clawdbot |
skills/tokenjuice/SKILL.md |
|
| Cline | Pre-tool wrapping | tokenjuice install cline |
~/.cline/hooks/PreToolUse; native CLI 3.0.74 input wrapping |
|
| CodeAnt | Guidance | tokenjuice install codeant |
.codeant/instructions.json |
|
| CodeBuddy | Pre-tool wrapping | tokenjuice install codebuddy |
~/.codebuddy/settings.json |
|
| Codebuff | Guidance | tokenjuice install codebuff |
AGENTS.md |
|
| Codegen | Guidance | tokenjuice install codegen |
AGENTS.md |
|
| Coder Agents | Guidance | tokenjuice install coder-agents |
.agents/skills/tokenjuice/SKILL.md |
|
| CodeRabbit | Guidance | tokenjuice install coderabbit |
.coderabbit.yaml |
|
| Codex CLI | Explicit wrapping | tokenjuice wrap -- <command> |
Native 0.166.0 hooks lack exit status; automatic compaction stays off | |
| Command Code | Explicit wrapping | tokenjuice wrap -- <command> |
Additive hook retired; scoped legacy cleanup remains available | |
| β | Community Grok CLI | Explicit wrapping | tokenjuice wrap -- <command> |
Automatic hook retired |
| Continue | Guidance | tokenjuice install continue |
.continue/rules/tokenjuice.md |
|
| Crush | Guidance | tokenjuice install crush |
.crush/skills/tokenjuice/SKILL.md |
|
| Cursor | Pre-tool wrapping | tokenjuice install cursor |
~/.cursor/hooks.json |
|
| Deep Agents Code | Guidance | tokenjuice install deepagents |
.deepagents/AGENTS.md |
|
| DeepSeek Harness | Native plugin | dsh plugin --profile PROFILE add <bundle> |
Use the packaged dist/hosts/deepseek-harness/bundle; PTC requires explicit wrapping |
|
| Devin for Terminal | Pre-tool wrapping | tokenjuice install devin |
.devin/hooks.v1.json |
|
| Docker Agent | Guidance | tokenjuice install docker-agent |
.docker-agent/tokenjuice.md |
|
| dot-agents | Guidance | tokenjuice install dot-agents |
~/.agents/rules/global/rules.mdc; run dot-agents sync after install or uninstall |
|
| Doubao Work | Manual skill import | Import the packaged Doubao Work skill | Personal file/folder import; native execution unqualified | |
| Droid (Factory CLI) | Pre-tool wrapping | tokenjuice install droid |
~/.factory/hooks.json or legacy settings |
|
| ECA | Guidance | tokenjuice install eca |
.eca/skills/tokenjuice/SKILL.md |
|
| Elyra | Guidance | tokenjuice install elyra |
.elyra/skills/tokenjuice/SKILL.md |
|
| FastMCP | Python middleware | pip install 'tokenjuice-integrations[fastmcp]' |
Add TokenjuiceMiddleware to the server or proxy; routed MCP traffic only |
|
| Firebase Studio | Guidance | tokenjuice install firebase-studio |
.idx/airules.md |
|
| ForgeCode | Guidance | tokenjuice install forgecode |
AGENTS.md |
|
| Gemini CLI | Pre-tool wrapping | tokenjuice install gemini-cli |
~/.gemini/settings.json; BeforeTool command wrapping |
|
| GitHub Copilot CLI | Result replacement | tokenjuice install copilot-cli |
native Bash replacement; 1.0.105 acceptance | |
| GitHub Copilot coding agent | Result replacement | tokenjuice install copilot-agent |
.github/hooks/tokenjuice-agent.json |
|
| GitHub Copilot SDK | SDK result hook | createCopilotSdkHooks() from tokenjuice/copilot-sdk |
Compose with application onPostToolUse hooks; successful Bash results only |
|
| GitLab Duo Agent Platform | Guidance | tokenjuice install gitlab-duo |
.gitlab/duo/chat-rules.md |
|
| Google Antigravity | Guidance | tokenjuice install antigravity |
.agents/rules/tokenjuice.md |
|
| Goose | Guidance | tokenjuice install goose |
.goosehints |
|
| gptme | Guidance | tokenjuice install gptme |
AGENTS.md |
|
| Greptile | Guidance | tokenjuice install greptile |
.greptile/rules.md |
|
| Grok Bot | Experimental guidance | tokenjuice install grok-bot |
experimental local rule; cloud skill workflow | |
| Grok Build | Guidance | tokenjuice install grok-build |
AGENTS.md |
|
| Hermes | Native plugin | Copy the packaged bundle, then hermes plugins enable tokenjuice |
Native user-plugin directory; transform_terminal_output |
|
| IBM Bob Shell | Guidance | tokenjuice install bob |
AGENTS.md |
|
| Jean2 | Guidance | tokenjuice install jean2 |
AGENTS.md |
|
| JetBrains AI Assistant | Guidance | tokenjuice install jetbrains-ai |
.aiassistant/rules/tokenjuice.md |
|
| Jules | Guidance | tokenjuice install jules |
AGENTS.md |
|
| Junie | Guidance | tokenjuice install junie |
.junie/AGENTS.md |
|
| Kilo Code | Guidance | tokenjuice install kilo |
kilo.jsonc or .kilo/kilo.jsonc + .kilo/rules/tokenjuice.md |
|
| Kimi Code CLI | Explicit wrapping | tokenjuice wrap -- <command> |
Automatic hook retired | |
| Kiro | Guidance | tokenjuice install kiro |
.kiro/steering/tokenjuice.md |
|
| Knowns | Guidance | tokenjuice install knowns |
KNOWNS.md |
|
| LangChain | Python middleware | pip install 'tokenjuice-integrations[langchain]' |
Add TokenjuiceMiddleware with an explicit shell-result decoder |
|
| β | LeanCTL | Guidance | tokenjuice install leanctl |
.leanctl/instructions.md |
| LocalCode | On-demand tool (beta) | tokenjuice install localcode |
~/.localcode/plugins/tokenjuice/ |
|
| Mastra | Output processor | createMastraProcessor() from tokenjuice/mastra |
Add to outputProcessors with application decoder/replacement callbacks |
|
| mcp-agent | Guidance | tokenjuice install mcp-agent |
.mcp-agent/agents/tokenjuice.md |
|
| mini-SWE-agent | Guidance | tokenjuice install mini-swe-agent |
.mini-swe-agent/tokenjuice.yaml |
|
| Mistral Vibe | Guidance | tokenjuice install mistral-vibe |
AGENTS.md |
|
| Mux / Xum | Explicit wrapping | tokenjuice wrap -- <command> |
Automatic hook retired | |
| β | NovaKit CLI | Guidance | tokenjuice install novakit |
NOVAKIT.md |
| Ona Agent | Guidance | tokenjuice install ona |
.ona/skills/tokenjuice/SKILL.md |
|
| Open Interpreter | Guidance | tokenjuice install open-interpreter |
AGENTS.md |
|
| Open WebUI | Manual tool import (beta) | tokenjuice install openwebui |
.openwebui/tools/tokenjuice_compact.py; then import in Workspace Tools |
|
| OpenClaw | External plugin | openclaw plugins install @openclaw/tokenjuice |
~/.openclaw/openclaw.json; enable plugin and restart Gateway (see below) |
|
| OpenCode V1 | Result replacement | tokenjuice install opencode |
~/.config/opencode/plugins/tokenjuice.js |
|
| OpenCode V2 | Result replacement | tokenjuice install opencode-v2 |
foreground shell result replacement; native v2.0.18 acceptance |
|
| OpenHands | Explicit wrapping | tokenjuice wrap -- <command> |
Manual wrapping; legacy hook cleanup | |
| pi | Result replacement | tokenjuice install pi |
~/.pi/agent/extensions/tokenjuice.js |
|
| β | pi-go | Guidance | tokenjuice install pi-go |
.pi/skills/tokenjuice/SKILL.md |
| Plandex | Guidance | tokenjuice install plandex |
PLANDEX.tokenjuice.md |
|
| QClaw | Migration only | Follow the WorkBuddy migration guide | No QClaw hook installer; qualify WorkBuddy separately | |
| Qoder (guidance) | Guidance | tokenjuice install qoder |
AGENTS.md; use qoder-cli for the replacement hook |
|
| Qoder CLI | Result replacement | tokenjuice install qoder-cli |
Native PostToolUse; separate from Qoder guidance below |
|
| QoderWork skills | Guidance | tokenjuice install qoderwork |
guidance skill at ~/.qoderwork/skills/tokenjuice/SKILL.md |
|
| Qodo Code Review | Guidance | tokenjuice install qodo |
.pr_agent.toml |
|
| Qwen Code | Pre-tool wrapping | tokenjuice install qwen-code |
.qwen/settings.json |
|
| QwenWork | Guidance | tokenjuice install qwenwork |
guidance skill at ~/.qwenwork/skills/tokenjuice/SKILL.md |
|
| Replit Agent | Guidance | tokenjuice install replit |
replit.md |
|
| Roo Code | Guidance | tokenjuice install roo |
.roo/rules/tokenjuice.md |
|
| Rovo Dev CLI | Guidance | tokenjuice install rovo |
AGENTS.md |
|
| β | Ruler | Guidance | tokenjuice install ruler |
.ruler/tokenjuice.md |
| Stagewise | Guidance | tokenjuice install stagewise |
.stagewise/skills/tokenjuice/SKILL.md |
|
| SWE-agent | Guidance | tokenjuice install swe-agent |
.swe-agent/tokenjuice.yaml |
|
| T3 Code | Provider integration | Configure the selected Codex, Claude Code or OpenCode provider | Install on the machine executing tools; no separate T3 installer | |
| Tabby | Guidance | tokenjuice install tabby |
~/.tabby/config.toml |
|
| Tabnine CLI | Guidance | tokenjuice install tabnine |
TABNINE.md |
|
| Trae | Guidance | tokenjuice install trae |
.trae/rules/project_rules.md |
|
| UiPath for Coding Agents | Guidance | tokenjuice install uipath |
AGENTS.md |
|
| VS Code Copilot Chat (Local) | Pre-tool wrapping | tokenjuice install vscode-copilot |
~/.copilot/hooks/tokenjuice-vscode.json |
|
| Warp | Guidance | tokenjuice install warp |
AGENTS.md / WARP.md |
|
| Windsurf | Guidance | tokenjuice install windsurf |
.windsurf/rules/tokenjuice.md |
|
| WorkBuddy | Manual skill import | Import the packaged WorkBuddy skill | Desktop import and execution unqualified; separate from CodeBuddy CLI | |
| Zed | Guidance | tokenjuice install zed |
.rules |
|
| Zencoder | 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.
For example, Claude Code uses pre-tool command wrapping:
tokenjuice install claude-code
tokenjuice doctor claude-codeRestart 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:
openclaw plugins install @openclaw/tokenjuice
openclaw config set plugins.entries.tokenjuice.enabled true
openclaw gateway restartMatch the plugin to your OpenClaw version. See the OpenClaw guide 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.
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 discoverreduce compacts existing text. wrap runs a command and compacts its observed output.
reduce-json provides the machine protocol for adapters.
See the spec for options, JSON envelopes, rules, and storage behavior.
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 <artifact-id>.
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.
- documentation index β all integration guides and reference pages
- harness and framework catalog β setup routes and configuration locations
- support and verification β evidence and acceptance limits
- spec β CLI, adapter protocol, compaction, and storage
- contributing β development and validation
- security β private vulnerability reporting
π built by Vincent Koc.
