majiayu000

Ccstats — Data skill for Claude Code

Data community

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

How to install Ccstats

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

What Ccstats does

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

Alternatives in Data

  • Claude Code Usage Monitor — by Maciek-roboblog - A real-time terminal-based tool for monitoring Claude Code token usage 7k ★
  • Token Dashboard — See where Claude Code is burning tokens - turn raw JSONL transcripts into local cost analytics, hotspot views 669 ★
  • FACT — FACT – Fast Augmented Context Tools: FACT is a lean retrieval pattern that skips vector search 161 ★

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