Ccstats banner
majiayu000 majiayu000

Ccstats

Data community

Description

Fast CLI for Claude Code and OpenAI Codex token/cost usage analytics

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

ccstats

[![Crates.io](https://img.shields.io/crates/v/ccstats.svg)](https://crates.io/crates/ccstats) [![GitHub Release](https://img.shields.io/github/v/release/majiayu000/ccstats)](https://github.com/majiayu000/ccstats/releases) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/majiayu000/ccstats/blob/main/LICENSE)

![ccstats token and cost analytics card](docs/branding/readme-card.png)

`ccstats` is a fast CLI for token and cost usage analytics for Claude Code, OpenAI Codex, Cursor, Grok, and Kimi Code logs.

Search keywords: `claude code usage stats`, `codex usage stats`, `cursor usage stats`, `token usage cli`, `ai token cost tracker`.

Highlights

  • Fast local analysis of usage JSONL logs
  • Claude Code support (~/.claude/projects/)
  • OpenAI Codex support (~/.codex/sessions/)
  • Codex weekly quota pace and reset estimates from provider snapshots
  • Cursor usage API support (CURSOR_API_KEY or CURSOR_SESSION_TOKEN)
  • Grok support (~/.grok/sessions/)
  • Kimi Code support (~/.kimi-code/sessions/)
  • Daily/weekly/monthly/project/session views
  • Top-N leaderboard ranking models or projects by cost share
  • Optional model-level token and cost breakdown
  • Reusable Rust SDK for embedding local usage and cost summaries in other apps

Installation

Homebrew (macOS/Linux)

brew install majiayu000/tap/ccstats

Cargo binstall (prebuilt binary)

cargo binstall ccstats

Cargo install (from source)

cargo install ccstats

Shell script

curl -fsSL https://raw.githubusercontent.com/majiayu000/ccstats/main/install.sh | sh

# Install a specific version
curl -fsSL https://raw.githubusercontent.com/majiayu000/ccstats/main/install.sh | VERSION=v0.2.63 sh

Manual download

Download prebuilt archives and SHA-256 checksums from [GitHub Releases](https://github.com/majiayu000/ccstats/releases).

Quick Start (Codex)

# Install
brew install majiayu000/tap/ccstats