Claude Code usage

claude-code-costs

Script that tallies how much your Claude Code conversations have cost.

204 stars 16 forksUsage & cost trackers Source

Install

Install
npx claude-code-costs
From source
git clone https://github.com/philipp-spiess/claude-code-costs.git

From the 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 and approach to getting things done with it.

Installation

You don't need to install anything! Just run:

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 charts

The 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
Read the full README on GitHub

Details

Language
JavaScript
Last updated
16 June 2025

FAQ

What is claude-code-costs?

Script that tallies how much your Claude Code conversations have cost. It is a usage for Claude Code, from philipp-spiess/claude-code-costs on GitHub.

How do I install claude-code-costs?

Run npx claude-code-costs, then follow the setup in the README.

Is claude-code-costs popular?

philipp-spiess/claude-code-costs has 204 GitHub stars and 16 forks, and is included in 1 curated Claude Code list. It was last updated on 16 June 2025.

More usage & cost trackers

Browse the most popular Claude Code mods, all usage & cost trackers, or the skills and MCP server directories.