Who it is forA developer using Claude Code who wants to save tokens and read shorter replies, and has a local LLM server running.
The problemClaude Code's output is often long and token-heavy, and the developer wants it condensed without sending it to another hosted service.
The outcomeClaude Code's replies in the terminal are rewritten by a local model, and the original output is still available with ctrl-o.
What you need first
- Go toolchain, so `go install` works
- Claude Code installed
- A local LLM server such as Llama.app or Ollama, with a model downloaded
- A Mac, since the README says it was only tested on Mac
Steps
- Install Llama.app from https://github.com/ggml-org/Llama-macOS, then download GPT-OSS 20B through it (the README's recommended model).
- Run
go install github.com/zachahn/vomit@latest. - Run
vomit initto set up the connection details to your LLM. - Run
vomit scrub -claudeand follow its instructions on replacing Claude's output via hooks. - Start Claude Code and send a prompt. Press ctrl-o to compare with Claude's original output.
Prompt for your agent
Install the zachahn/vomit repo with `go install github.com/zachahn/vomit@latest`, then run `vomit init` against the local LLM server at <llm-endpoint> and follow the output of `vomit scrub -claude` to wire up the Claude Code hook. Report the setup steps you completed, and verify by sending one Claude Code prompt and confirming the reply is rewritten, with the original visible after ctrl-o.
Caveat. The README says the local model can hallucinate and the tool is slow, and that it was only tested on Mac.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for zachahn/vomit and "Shorten Claude Code output with a local LLM"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer