VT

vincentkoc/tokenjuice

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

527 stars 质量 83 趋势 40MIT

🧃 代币权重减轻。为终端重载代理工作流提供精益输出压缩。可作为原生CLI工具,或作为流行编码和代理框架的扩展。

概览

适用于终端重载代理工作流程的精益输出压缩。 Tokenjuice 是一个用于终端重载代理工作流的确定性输出压缩器。代理和线束运行噪声较大的命令,如 git status、pnpm test、docker build、RG 或 PNPM ——帮助;Tokenjuice 保持命令语义不变,执行后观察输出,并返回由规则驱动缩减器构建的较小负载,而不是将整面终端文本重新导出上下文。 关键在于杠杆效应:减少转录浪费、减少无用的重播,以及工具间更清晰的切换,同时不会让壳层变得神奇。原始输出只有在你通过 -- 原始 / ---完整或可选加入的文物存储明确请求时才会保留;规则保持可检查的 JSON 而非 LLM 的感觉;主机集成保持在同一核心简化器上的薄包装,而不是变成一次性的适配器逻辑。 OpenClaw 支持已集成在 OpenClaw 端。

概述(AI 翻译)

适用于终端重载代理工作流程的精益输出压缩。

什么是代币汁?

tokenjuice 是一个用于终端重载代理工作流的确定性输出压缩器。代理和机束运行噪声命令,如 git status、pnpm test、docker build、rg 或 pnpm --help;tokenjuice 保持命令语义不变,执行后观察输出,并返回由规则驱动缩减器构建的较小负载,而不是将整面终端文本重新导入上下文。

关键在于杠杆效应:减少转录浪费,减少无用的重播,工具间切换更简洁,同时不让壳体变得神奇。原始输出只有在你通过--raw / [--full或可选的产物存储明确请求时才会保留,规则保持可检查的JSON而非LLM的感觉,主机集成保持在同一核心缩减器上的薄包装,而不是一次性的适配器逻辑。

主机集成

支持的集成:

标志 客户端 安装 钩子文件
克劳德代码 tokenjuice install claude-code ~/.claude/settings.json
CodeBuddy tokenjuice install codebuddy ~/.codebuddy/settings.json

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

tokenjuice 🧃

lean output compaction for terminal-heavy agent workflows.

what is tokenjuice?

tokenjuice is a deterministic output compactor for terminal-heavy agent workflows. agents and harnesses run noisy commands like git status, pnpm test, docker build, rg, or pnpm --help; tokenjuice keeps the command semantics untouched, observes the output after execution, and returns a smaller payload built from rule-driven reducers instead of dumping the whole wall of terminal text back into context.

the point is leverage: less transcript waste, fewer useless reruns, and cleaner handoff between tools without making the shell magical. raw output stays available only when you explicitly ask for it through --raw / --full or opt-in artifact storage (one exception: the pi extension stores the raw bytes of every rewrite, so tokenjuice cat can always recover them; set TOKENJUICE_ARTIFACT_DIR to choose where), rules stay inspectable JSON instead of LLM vibes, and host integrations stay thin wrappers around the same core reducer instead of becoming one-off adapter logic.

host integrations

supported integrations:

Logo Client Install Hook file
Claude Code tokenjuice install claude-code ~/.claude/settings.json
CodeBuddy tokenjuice install codebuddy ~/.codebuddy/settings.json
Codex CLI tokenjuice install codex ~/.codex/hooks.json
Cursor tokenjuice install cursor ~/.cursor/hooks.json
Droid (Factory CLI) tokenjuice install droid ~/.factory/settings.json
GitHub Copilot CLI tokenjuice install copilot-cli ~/.copilot/hooks/tokenjuice-cli.json
OpenClaw openclaw config set plugins.entries.tokenjuice.enabled true ~/.openclaw/openclaw.json
OpenCode tokenjuice install opencode ~/.config/opencode/plugins/tokenjuice.js
pi tokenjuice install pi ~/.pi/agent/extensions/tokenjuice.js
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add vincentkoc/tokenjuice
新手?先看 mcpskill.org 教程 →