Documentation
Distill.codes helps AI coding agents keep changes lean by reducing token noise, repetitive editing, and unnecessary cycles.
Use this guide to set up, run, and measure your results.
Overview
Distill.codes is for teams and developers using AI coding agents for regular coding tasks. If you want less output waste, more predictable PRs, and lower infrastructure cost while keeping your existing tools, this is for you.
- For vibe coders: prototype fast, then keep outputs easier to review.
- For solo developers: keep token spend and turnaround more controlled.
- For small teams: keep coding tasks reviewable, even when several people run agents.
- For platform teams: standardize efficiency behavior across projects and models.
Distill.codes does not replace your agent, provider, or credentials. You keep your current Claude or Anthropic access and only route through Distill.codes as an optimization layer.
How it works
Distill.codes sits as a lightweight layer between your agent and the model API. It helps the agent complete tasks with less noise by improving how prompts, context, and outputs are handled throughout the task cycle.
In practice, this means faster iterations and cleaner final patches when the task is non-trivial: fewer unnecessary changes, less repeated back-and-forth, and fewer extra lines to review.
Distill.codes is intentionally minimal: one config update, existing workflows, and your normal agent login/session model.
Setup
After signup, copy your Distill.codes proxy key from the dashboard and apply one config value for your chosen agent.
Recommended automatic setup:
npx distill-codes enable "https://proxy.distill.codes/<proxy-key>/essential/anthropic"Then restart Claude Code.
You can also configure it manually through the config file.
- Open the Distill.codes dashboard.
- Create/verify your proxy key.
- Use
ANTHROPIC_BASE_URLfor Claude Code in~/.claude/settings.json. - Restart the agent process and run your normal workflow.
Claude Code setup
File: ~/.claude/settings.json.
Add your Distill.codes URL into settings so Claude API requests go through the proxy.
{
"theme": "light",
"env": {
"ANTHROPIC_BASE_URL":
"https://proxy.distill.codes/<proxy-key>/essential/anthropic"
}
}Replace <proxy-key> with the key from your Distill.codes dashboard.
Recommended: Fable 5 or Opus 5 with xhigh effort. Not recommended: Sonnet 5, due to a smaller and unstable effect. Avoid Max effort by default: it can overthink.
For the full signup and setup flow, see Set up Claude Code with Distill.codes.
CLI commands
Use the Distill.codes CLI for Claude Code setup, local benchmark runs, and switching back to direct access.
Enable Distill.codes
npx distill-codes enable "https://proxy.distill.codes/<proxy-key>/essential/anthropic"Validates the proxy URL, updates ~/.claude/settings.json, and keeps a local backup of the previous settings file.
The command also accepts a raw proxy key, a full Distill.codes proxy URL, or the copied Claude config fragment.
Run a local benchmark
npx distill-codes bench "https://proxy.distill.codes/<proxy-key>/essential/anthropic"Runs the same Claude Code task directly and through Distill.codes in separate local folders, then writes a local report.
Disable Distill.codes
npx distill-codes disableRemoves the active Distill.codes URL and restores the previous non-Distill value when available.
Clear any Claude base URL
npx distill-codes clear-base-urlRemoves ANTHROPIC_BASE_URL even when it is not a Distill.codes URL. Use for troubleshooting.
Test it
To validate the effect, run the same task twice:
- Once with your normal provider endpoint.
- Once through Distill.codes.
Use separate fresh directories or worktrees so runs do not share state.
Compare the two results on output tokens, wall-clock time, operations count, changed files, added/removed LOC, and final behavior.
Keep model, prompt, repository, and task definition as identical as possible.
For a quick local comparison, use the CLI benchmark:
npx distill-codes bench "https://proxy.distill.codes/<proxy-key>/essential/anthropic"Benchmarks
Use paired tasks to compare Distill.codes and direct provider runs.
Focus on the same repo, same task, same model, and same prompt. Track output tokens, wall-clock time, operations count, and changed LOC.
npx distill-codes bench "https://proxy.distill.codes/<proxy-key>/essential/anthropic"Best practices
- Keep the agent task prompt focused and specific.
- Prefer one meaningful change per run over many tiny edits.
- Review results for complexity and maintainability, not only line count.
- Test long/complex tasks too; gains are often more visible there.
- Store your Distill.codes key securely and rotate it if exposed.
FAQ
Will Distill.codes always reduce token usage?
Not always. Some short or already compact tasks may show little difference.
Do you store prompts or generated source code?
No. Distill.codes stores no prompts, code, or full request/response bodies.
Can I switch back to direct provider access?
Yes. Use the CLI or remove the Distill.codes line from your local config and restart the agent.
npx distill-codes disable- Claude Code: remove
ANTHROPIC_BASE_URLfrom~/.claude/settings.json.
Who is this for?
Anyone using Claude Code for real software work and wanting cleaner output economics.
Feedback
Use the public feedback repository for bug reports, feature requests, and product feedback.
Do not post API keys, proxy URLs, billing details, private source code, prompts, logs, or customer data in public issues.