Skip to main content
Thanks to ccusage’s incredibly small bundle size, you can run it directly without installation:
# Recommended - always include @latest to ensure you get the newest version
npx ccusage@latest
We strongly recommend using @latest suffix with npx (e.g., npx ccusage@latest) to ensure you’re running the most recent version with the latest features and bug fixes.

Global installation

If you prefer to install ccusage globally:
npm install -g ccusage
Once installed globally, you can run ccusage directly:
ccusage daily
ccusage monthly
ccusage session

Requirements

1

Node.js version

ccusage requires Node.js version 20.19.4 or higher.
2

Claude Code data

ccusage reads data from your local Claude Code installation. It automatically searches for data in:
  • ~/.config/claude/projects/ (new default)
  • ~/.claude/projects/ (old default)
3

Custom data directory

If your Claude data is in a custom location, set the CLAUDE_CONFIG_DIR environment variable:
# Single path
export CLAUDE_CONFIG_DIR="/path/to/claude"

# Multiple paths
export CLAUDE_CONFIG_DIR="/path/to/claude1,/path/to/claude2"

Verify installation

Verify ccusage is working correctly:
ccusage --help
You should see the help output with available commands and options.
If you’re running ccusage for the first time and see “No Claude usage data found”, make sure you have Claude Code installed and have run at least one session.
Install companion tools for other AI coding assistants:
npx @ccusage/codex@latest       # OpenAI Codex usage tracking
npx @ccusage/opencode@latest    # OpenCode usage tracking
npx @ccusage/pi@latest          # Pi-agent usage tracking
npx @ccusage/amp@latest         # Amp usage tracking
npx @ccusage/mcp@latest         # MCP Server

Next steps

Quick start

Learn how to run your first usage report

Build docs developers (and LLMs) love