Toktrim
Minifies verbose command-line output for AI agents, providing compact, structured JSON to save tokens and highlight actionable data.
Toktrim is an intelligent utility designed to address the challenge of verbose command outputs consuming excessive tokens in AI agent workflows, particularly on Windows. It intercepts raw shell command output, applies specialized parsers based on the command type (e.g., pytest, git, npm, tasklist), and returns only the critical information in a compact, structured JSON format. This drastically reduces token consumption, with benchmarks showing savings of over 90% for typical verbose commands, allowing AI agents to focus on errors, warnings, summaries, and key data without drowning in irrelevant logs or debug information.