Overview of tokenjuice
maintokenjuice is a deterministic output compactor designed for terminal-heavy agent workflows. It is used to reduce the noise generated by commands like git status, pnpm test, docker build, rg, or pnpm --help.
Instead of returning a massive wall of terminal text to an LLM context, tokenjuice observes the command output and returns a smaller, condensed payload built from rule-driven reducers. This approach preserves command semantics while minimizing transcript waste and reducing unnecessary reruns.
Key characteristics:
- Deterministic: Uses rule-driven reducers (inspectable JSON) rather than LLM-based summarization.
- Non-magical: Keeps the shell behavior standard; raw output is only returned if explicitly requested via
--rawor--fullflags, or through opt-in artifact storage. - Thin Integrations: Host integrations act as thin wrappers around the core reducer logic.