thedistillery

作者 The-Distillery-dev已验证

The Distillery. A Token Optimization Proxy

93
Stars
10
Forks
TypeScript
语言
2026/8/24
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/The-Distillery-dev/thedistillery

快速入门

使用 thedistillery 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

The Distillery

Cut your input tokens before they reach the model.

The Distillery is a local token-optimization proxy for AI coding tools. It sits between your coding agent and the model API, removes redundant input context, and reports the overall input reduction across your sessions. It is built for developers who want lower model bills without prompt rewriting, workflow changes, or sending code to The Distillery's hosted service for optimization.

npm license node

Install

npm install -g thedistillery

Requires Node.js >=20.9.0 <25.

Quick Start

# Log in once
thedistillery auth login

# Start the local proxy
thedistillery start

# Use Claude Code normally, then inspect savings
thedistillery stats

thedistillery start binds to 127.0.0.1:3080 by default and automatically configures Claude Code routing. For other clients, point the tool at the local Anthropic or OpenAI-compatible endpoint shown below.

What It Does

The Distillery optimizes request input before it reaches the upstream model API:

  1. Deduplication - removes identical tool outputs already seen in the session.
  2. Tool output distillation - trims oversized shell, search, diff, and file outputs while preserving useful head/tail context.
  3. Retention - keeps the most useful session context when history grows too large.
  4. Prompt-cache placement - on paid plans, places cache breakpoints automatically where supported.

The displayed reduction is an input-token metric. Output tokens are streamed back unchanged.

Supported Clients

The Distillery works with Claude Code automatically and with any client that supports a custom Anthropic base URL or OpenAI-compatible base URL.

ClientConfigurationOpenAI adapter required
Claude CodeAuto-configured by thedistillery startNo
Clinecline.anthropicBaseUrl in VS Code settingsNo
GooseANTHROPIC_HOST=http://localhost:3080No
Zedlanguage_models.anthropic.api_url in settingsNo
Aider--openai-api-base http://localhost:3080/v1 + --model openai/claude-sonnet-4-5Yes
Codex CLIOPENAI_BASE_URL=http://localhost:3080/openai/v1 with API-key authYes

Full client guides live at thedistillery.dev/clients. Codex CLI must use API-key auth; ChatGPT login uses a websocket backend and bypasses OPENAI_BASE_URL.

Using AWS Bedrock through Bedrock-Mantle? See Bedrock setup.

Configuration

Create .distilleryrc.json in your project directory, or any parent directory, to set a project-level preset:

{ "preset": "smart" }
PresetUse whenBehavior
lightYou want the safest baselineDeduplication only
smartMost coding sessionsDeduplication, tool-output distillation, retention
deepLong sessions with large outputsMore aggressive distillation and retention

Legacy preset names still work: conservative maps to light, balanced maps to smart, and aggressive maps to deep.

Disable compression for a project:

{ "preset": "smart", "compression": false }

Environment variables:

VariableDescription
DISTILLERY_PORTProxy port, default 3080
DISTILLERY_BYPASSSet to 1 for pass-through mode

CLI

thedistillery start              # Start the local proxy
thedistillery start --port 4000  # Use a different port
thedistillery stop               # Stop the proxy
thedistillery stats              # Show cumulative token and cost savings
thedistillery preset smart       # Switch global preset
thedistillery config show        # Show resolved config
thedistillery sessions --detail  # Show recent sessions, Pro only
thedistillery export --format csv --output sessions.csv
thedistillery billing status
thedistillery billing breakdown --month 2026-07
thedistillery billing manage
thedistillery uninstall --dry-run

For one-off commands, run a child process with an embedded proxy:

thedistillery run claude --watch

Data And Privacy

Optimization runs locally on your machine. The hosted service receives usage metadata needed for account, billing, dashboard, alerts, and attribution features: token counts, cost deltas, model/session metadata, and project attribution. It does not receive your code or prompts for optimization.

Local session data is stored in:

~/.distillery/data.db

Self-Hosting And Safety

The proxy is designed for loopback-only use and binds to 127.0.0.1 by default.

Do not bind it to 0.0.0.0 unless you understand the risk. Binding to all interfaces can expose a proxy that forwards requests using your API credentials.

Supported local deployment:

ANTHROPIC_BASE_URL=http://127.0.0.1:3080

Uninstall

Interactive teardown:

thedistillery uninstall

Preview what would be removed:

thedistillery uninstall --dry-run

Full uninstall guidance: thedistillery.dev/docs/uninstalling.

Development

npm install
npm test
npm run build:cli

Useful scripts:

npm run dev                 # Run the CLI from source
npm run benchmark:tokens    # Compare token counts
npm run generate:benchmark  # Regenerate benchmark JSON
npm run build               # Build marketing, dashboard, API, and CLI

Links

License

This project is licensed under the Elastic License 2.0.

常见问题

What is thedistillery?

thedistillery is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by The-Distillery-dev. The Distillery. A Token Optimization Proxy. It has 93 GitHub stars.

Is thedistillery safe to use?

Yes. thedistillery passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install thedistillery?

Clone the repository with "git clone https://github.com/The-Distillery-dev/thedistillery" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is thedistillery written in?

thedistillery is primarily written in TypeScript. It is open-source under The-Distillery-dev on GitHub, so you can review or fork the full source.

Are there alternatives to thedistillery?

Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh thedistillery against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ui-ux-pro-max-skill

by nextlevelbuilder

12

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

119,92012,870Python
CLI 工具ai-skillsantigravity
查看详情

happy

by slopus

Mobile and Web client for Codex and Claude Code, with realtime voice, encryption and fully featured

23,4501,980TypeScript
CLI 工具
查看详情

claudecodeui

by siteboon

Use Claude Code, OpenCode, Cursor CLI, and Codex on mobile and web with CloudCLI (aka Claude Code UI). CloudCLI is a free open source webui/GUI that helps you manage your Claude Code session and projects remotely.

13,3941,866TypeScript
CLI 工具
查看详情

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

12,5471,869JavaScript
CLI 工具
查看详情

ccstatusline

by sirmalloc

🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more.

12,508545TypeScript
CLI 工具
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情
thedistillery — Claude Code AI Skill | SkillTip