AI 开发者工具
claude-thermos
一个开源工具,用于保持Claude Code的提示缓存活跃,避免当子代理运行超过五分钟时产生昂贵的重新编码。
claude-thermos
什么是 claude-thermos?
claude-thermos 是一个开源工具,作为本地反向代理运行,监控Claude Code会话,并自动发送最小的预热请求,防止在子代理空闲期间提示缓存过期。
claude-thermos 与相似工具比较
| 计价模式 | 免费 | 免费 | 免费 | 免费 |
| 免费额度 | ||||
| 主要功能 |
|
|
|
|
| 优点 |
|
|
|
|
| 缺点 |
|
|
|
|
| 适合对象 |
|
|
|
|
如何使用 claude-thermos?
- 1确保已安装 Python 3.11+ 且 'claude' CLI 在 PATH 中。
- 2通过 uvx 运行 claude-thermos 来启动 Claude Code:'uvx claude-thermos'(替代 'claude')。
- 3像往常一样传递任何 Claude 参数:'uvx claude-thermos -p "修复 bug"'。
- 4可选地使用标志调整行为:--idle, --interval, --max-cycles, --subagent-window。
- 5要为某次运行禁用预热,设置环境变量 CLAUDE_WARMER_DISABLE=1。
claude-thermos 主要功能
- 子代理空闲期间的自动缓存预热
- 可调整的空闲时间、间隔和最大循环次数
- 事件日志和会话摘要,包含成本节省
- 与现有 Claude Code 使用的无缝集成
claude-thermos 使用场景
- 减少长时间多子代理 Claude Code 会话的成本
- 避免主代理在子代理上阻塞时提示缓存过期
- 监控和优化 Claude Code 部署的 API 使用
claude-thermos 价格与免费额度
claude-thermos 目前采用 免费 模式。
此工具完全免费使用
claude-thermos 优缺点
优点
- 通过保持缓存活跃降低 API 成本
- 通过 uvx 轻松设置
- 提供详细日志和节省估算
- 开源且可定制
缺点
- 需要 Python 3.11+
- 仅适用于 Claude Code CLI
- 额外的本地代理设置可能增加复杂性
claude-thermos 最适合哪些用途?
- 使用 Claude Code 处理复杂任务且包含多个子代理的开发者
- 希望优化 Claude Code 会话 API 支出的团队