Dev Tools/ dev-tools · llm · cli · token-cost

A CLI Filter That Cut One Developer's LLM Token Bill by 91.8%

Lowfat strips noisy CLI output before passing it to AI agents, cutting token counts by 90%-plus on commands like grep, docker, and kubectl.

A solo developer built a small binary that intercepts CLI output before it reaches an AI agent, and two months of real-world data show it cuts LLM token consumption by 91.8% on average.

The tool is called lowfat. It wraps common commands - kubectl, grep, git, docker, find - and filters their output down to what an agent actually needs before passing it along. A full kubectl get -o yaml dump can run to thousands of lines; lowfat trims that before the model ever sees it. It ships as a single binary with a plugin system so filters can be customized per command. The developer's own usage logs show grep runs saving 96.2% of tokens, docker 96.1%, kubectl get 93.9%, and find 95.5% - though kubectl describe barely moved at 1.2%, a reminder that the plugin quality matters as much as the concept.

The wider point is that AI agents embedded in developer workflows inherit all the verbosity of the tools underneath them. Most CLI commands were designed to be read by humans who can skim; LLMs charge by the token either way. A thin filter layer is a low-tech answer to a cost problem that scales fast as agent use grows - and one that requires no changes upstream.

The near-zero result on kubectl describe, and a modest 57.9% on git diff, suggest lowfat is useful rather than universal. It is one person's two-month experiment, not a vetted open-source project with broad plugin coverage. But the underlying idea - strip the noise before it hits the model - is simple enough that it is surprising this is not already a default in most agent frameworks.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →