vincentkoc/tokenjuice
Sobre
🧃 Token weight loss. Lean output compaction for terminal-heavy agent workflows. Works as a native CLI tool or as an extension to popular coding and agent frameworks.
Ferramentas de desenvolvimentoCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- +1
- em 15 dias
- +12
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Original
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.
npm install -g tokenjuice
tokenjuice --version
tokenjuice wrap -- git status
Other package managers:
pnpm add -g tokenjuice
yarn global add tokenjuice
For Homebrew:
brew tap vincentkoc/tap
brew install tokenjuice
See distribution 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 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.
harness and framework catalog
| 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 |
| — | ZCode | Pre-tool wrapping | tokenjuice install zcode |
User ~/.zcode/cli/config.json; native agent fixture |
| aictl | Guidance | tokenjuice install aictl |
AICTL.md |
|
| Aider | Guidance | tokenjuice install aider |
CONVENTIONS.tokenjuice.md |
|
| — | Alma | 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 | 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 |
|
| — | AtomCode | Guidance skill | tokenjuice install atomcode |
Project .atomcode/skills/tokenjuice/SKILL.md |
| 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 |
|
| — | Craft Agents | Guidance skill | tokenjuice install craft-agents <workspace-dir> |
Selected workspace skills/tokenjuice/SKILL.md; explicit selection required |
| 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 |
|
| — | DevEco Code | Result replacement | tokenjuice install deveco |
beta native Bash plugin; released-host acceptance pending |
| 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 |
|
| — | Empryo / SoulForge | Pre-tool wrapping | tokenjuice install empryo (alias soulforge) |
Project .soulforge/config.json; native 2.20.25 tested with output limits |
| 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 |
|
| — | fx | Guidance | tokenjuice install fx |
Project AGENTS.md; set FX_PROJECT_DIR for another workspace |
| 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 |
|
| — | miniQ | Guidance skill | tokenjuice install miniq |
Project .miniq/skills; live discovery and execution unverified |
| mini-SWE-agent | Guidance | tokenjuice install mini-swe-agent |
.mini-swe-agent/tokenjuice.yaml |
|
| — | MiniMax Code | 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 | Result replacement (beta) | tokenjuice install mimo-code |
Native file hook; Linux x64 CLI 0.1.17 verified |
| Mistral Vibe | Guidance | tokenjuice install mistral-vibe |
AGENTS.md |
|
| — | Muse Code | Guidance | tokenjuice install muse-code |
project skill at .agents/skills/tokenjuice/SKILL.md; native discovery pending |
| Mux / Xum | Explicit wrapping | tokenjuice wrap -- <command> |
Automatic hook retired | |
| — | nanobot | Guidance | tokenjuice install nanobot |
<workspace>/skills/tokenjuice/SKILL.md; set NANOBOT_WORKSPACE for custom workspaces |
| — | NovaKit CLI | Guidance | tokenjuice install novakit |
NOVAKIT.md |
| — | Snow CLI | Result replacement (beta) | tokenjuice install snow-cli |
Native afterToolCall; Snow 0.9.15 local headless acceptance passed |
| — | Paimon | Guidance skill | tokenjuice install paimon |
Native user skills; live acceptance pending |
| — | Mister Morph | Guidance skill | tokenjuice install mister-morph |
Native user skills; live acceptance pending |
| — | Shelley | Guidance skill | tokenjuice install shelley |
Native user skills; live acceptance pending |
| 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 |
|
| — | oh-my-pi (omp) | Native package extension | omp plugin install tokenjuice |
Successful foreground Bash content; native 18.20.0 model-request acceptance |
| — | OpenHanako / HanaAgent | 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 | Explicit wrapping | tokenjuice wrap -- <command> |
Manual wrapping; legacy hook cleanup | |
| — | OmO | Result replacement | tokenjuice install omo |
Native OmO 5.1.70 root Bash results; exact/raw/failure preserved |
| 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 |
|
| — | QwenPaw | Workspace skill guidance | Import the packaged skill with QwenPaw's --agent-id |
Explicit workspace selection; native import and command execution unqualified |
| 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.
installation notes
For example, Claude Code uses pre-tool command wrapping:
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:
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 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
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 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 <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.
docs
- 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.
Explore projetos relacionados
Carregando…