vincentkoc/tokenjuice

🧃 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.

What it solves

Tokenjuice reduces the "wall of text" problem in AI agent workflows. When agents run terminal commands (like git status or docker build), the resulting output is often noisy and excessively long, wasting context window tokens and potentially confusing the LLM. Tokenjuice compacts this output into a smaller, meaningful payload without changing the command's actual behavior.

How it works

It acts as a deterministic output compactor. It observes the output of a command after execution and applies rule-driven reducers to shrink the payload. These rules are stored as inspectable JSON rather than relying on probabilistic LLM-based summarization. Users can still access the raw, full output if explicitly requested via --raw or --full flags, or through opt-in artifact storage.

Who it’s for

Developers building or using terminal-heavy AI agents and harnesses (such as Claude Code, Cursor, Aider, or OpenHands) who want to optimize token usage and improve agent reliability by cleaning up command transcripts.

Highlights

  • Deterministic Compaction: Uses rule-based reducers instead of LLM "vibes" to ensure consistent output.
  • Wide Integration Support: Provides one-command installation for a vast array of AI coding agents and IDEs.
  • Context Efficiency: Minimizes transcript waste and reduces the need for useless reruns.
  • Clandestine Operation: Keeps the shell experience standard while providing a thin wrapper for host integrations.

Related

  • Project
  • Project
  • Project
  • Project