🧃 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.
tokenjuice is a TypeScript CLI and library that compacts terminal output for agent workflows. It reduces token usage by applying rule-driven reducers to command output—from tools like `git status`, `pnpm test`, `docker build`, and others—while preserving command semantics, rather than sending raw output back to the agent context. The project supports integrations with numerous coding and agent frameworks including Claude Code, Cursor, GitHub Copilot CLI, OpenClaw, VS Code Copilot Chat, and many others, with each integration either wrapping commands before execution or processing results after tool use. Built in TypeScript with ESM, the codebase is organized into CLI, core logic, host-specific adapters, and rule definitions, with comprehensive testing via Vitest and releases distributed through npm, Homebrew, and Linux package managers.