开发者 Kelvin Qiu 在 Hacker News 上发布了一款名为 tare 的开源工具,用于分析 Claude Code 的本地日志,帮助用户查明 AI 配额消耗过快的原因 1。该工具通过读取本地日志并去重统计,可识别后台自动化会话、上下文重复发送等导致 token 激增的根源,并支持自然语言提问、生成报告和导出表格 1。
tare 采用 MIT 许可证,所有数据仅在本地处理,不发送网络请求 1。该工具要求 Claude Code 运行于 macOS 或 Linux,且需要 Python 3.9 及以上版本,用户可通过执行 npx skills add kelviq/tare -g -y --copy --agent claude-code 命令进行安装 1。在示例诊断中,该工具查出某日 99% 的用量来自工具而非用户,产生 1,553 个短会话、9,022 次请求,最多 51 个并行会话 1。此外,去重后该工具修正了原始日志因重复 API 响应导致的 86% 高估 1。
Developer Kelvin Qiu, also known as kelviq, has introduced an open-source tool named tare on Hacker News to help users analyze Claude Code local logs and identify the reasons behind rapid AI quota consumption 1. The utility processes local logs and deduplicates the data to pinpoint the root causes of token spikes, such as background automated sessions and repeatedly transmitted contexts 1. Additionally, the tool offers features like natural language querying, automated report generation, and spreadsheet exporting 1.
The software requires Claude Code to be running on macOS or Linux alongside Python 3.9 or later, and it can be installed using the command npx skills add kelviq/tare -g -y --copy --agent claude-code 1. In one diagnostic example, the tool demonstrated that 99% of a specific day's usage originated from tools rather than the user, producing 1,553 short sessions, 9,022 requests, and a maximum of 51 parallel sessions 1. The deduplication process also successfully corrected an 86% overestimation in the raw logs caused by repeated API responses 1. All data processing occurs strictly locally without sending any network requests, and the project is distributed under the MIT license 1.
评论
还没有评论,欢迎留下第一条。