https://github.com/philipp-spiess/claude-code-costs
https://github.com/philipp-spiess/claude-code-costs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/philipp-spiess/claude-code-costs
- Owner: philipp-spiess
- Created: 2025-05-29T10:47:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-05-29T11:06:58.000Z (4 months ago)
- Last Synced: 2025-05-29T12:41:45.981Z (4 months ago)
- Language: JavaScript
- Size: 1.33 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-claude-code - claude-code-costs - spiess/claude-code-costs) | Claude Code 使用成本跟踪 | 成本跟踪工具| (监控与分析)
- awesome-claude-code - **claude-code-costs**
README
# claude-code-costs

Analyze your Claude Code conversation costs with interactive visualizations.
💡 **Want to see how I use Claude Code?** [Here's my workflow](https://spiess.dev/blog/how-i-use-claude-code) and approach to getting things done with it.
## Installation
You don't need to install anything! Just run:
```bash
npx claude-code-costs
```## What it does
This tool analyzes all your Claude Code conversations stored in `~/.claude/projects/` and:
- Calculates total costs across all conversations
- Shows daily cost breakdown for the last 30 days
- Lists top 20 most expensive conversations
- Provides project-based filtering
- Generates an interactive HTML report with chartsThe report is automatically generated in your system's temp directory and opened in your default browser.
## Requirements
- Node.js 14.0.0 or higher
- Claude Code conversations stored in the default location (`~/.claude/projects/`)## Output
The tool provides:
1. Console summary of costs and top expensive conversations
2. Interactive HTML report with:
- Total cost summary
- Daily cost chart (last 30 days)
- Top 20 conversations bar chart
- Detailed table with filtering by project## License
MIT