Ghost Peony Features Dashboard Leaderboard News Sign in with GitHub npm GitHub

Obsessive
Stat Tracking
for Claude Code

Track every prompt, tool call, and late-night coding session. Earn badges. Build streaks. Watch your rank climb from Bronze to Obsidian.

BashStats featured on Product Hunt - AI coding agent stat tracker for Claude Code, Gemini CLI, and Copilot CLI
bashstats.com
bashstats
Obsessive stat tracking for CLI Agents
Gold Diamond 68%
Quick Start:
$ npm install -g bashstats && bashstats init
Or just tell your agent:
> Install bashstats globally with npm (npm install -g bashstats), then run bashstats init to set up the hooks and SQLite database. After init completes, verify it's working by running bashstats stats.

Track Locally. Share Globally.

Stats record locally the moment you run init. Sign in with GitHub to sync, share your profile, and climb the leaderboard.

📊

Hosted Profiles

Sign in with GitHub and get a shareable profile at bashstats.com/u/you with your rank, badges, activity heatmap, and full dashboard.

🏆

124+ Achievements

Earn badges for sessions, streaks, token usage, commits, and late-night coding. Tiered from Bronze to System Anomaly.

🔥

Streaks & Ranks

Daily streaks, session records, and an XP rank system that tracks your progress from Bronze to Obsidian.

🥇

Global Leaderboard

Compete with developers worldwide. Sortable by XP, rank, sessions, streaks, badges, and token usage.

🤖

MCP Integration

Query your rank, achievements, and weekly goals directly inside Claude Code. Just ask "what are my stats?"

🔒

Privacy Controls

Stats are local by default. Choose to share publicly, hide from the leaderboard, or go fully anonymous.

Your Stats at a Glance

A rich dashboard with activity heatmaps, session history, agent breakdowns, and weekly goals. View locally or on your hosted profile.

Stats in Your Terminal

Quick stat summaries, achievement progress, and streak info without leaving your terminal.

  • Instant stat summary with bashstats stats
  • Achievement progress bars with tier info
  • Current and longest streak display
  • Launch the dashboard with bashstats web
  • Export all data as JSON for analysis
bashstats
$ bashstats stats
 
bashstats v0.2.3
 
Prompts: 2,847   Tools: 12,403   Sessions: 342
Time coded: 186h 23m
Streak: 🔥 14 days (best: 31)
 
Rank: Gold 17,340 / 25,000 XP
████████████████░░░░░░░░ 68%
 
38 / 53 badges unlocked

Three Commands. You're Live.

1

Install & Init

npm install -g bashstats && bashstats init. Sets up hooks, database, and the MCP server.

2

Login

bashstats login opens GitHub OAuth in your browser. Stats sync automatically after every session.

3

Share

bashstats share uploads your stats and gives you a profile URL to share with the world.

Simple Commands

Command Description
bashstats init Install hooks and set up database
bashstats stats Quick stat summary in your terminal
bashstats achievements List all badges with progress bars
bashstats streak Show current and longest daily streak
bashstats web Launch the browser dashboard
bashstats login Sign in with GitHub for syncing
bashstats share Upload stats and get your profile URL
bashstats export Export all data as JSON
bashstats uninstall Remove hooks and data

Multi-Agent Support

Claude Code
Gemini CLI
Copilot CLI
OpenCode

Start Tracking Your Stats

Free and open source. Install in one command, sign in with GitHub, and join the leaderboard.

Sign in with GitHub View Leaderboard View on GitHub

Frequently Asked Questions

What is BashStats?

BashStats is a free, open-source stat tracker for CLI coding agents. It records every prompt, tool call, session, and streak from agents like Claude Code, Gemini CLI, and Copilot CLI. Data is stored locally in SQLite, with optional cloud sync and public profiles at bashstats.com.

How do I install BashStats?

Run npm install -g bashstats followed by bashstats init. This sets up the hooks, SQLite database, and MCP server. You can also tell your AI agent to install it for you. Works on Windows, macOS, and Linux.

What AI agents does BashStats support?

BashStats supports Claude Code, Gemini CLI, Copilot CLI, and OpenCode. It automatically detects which agent is running and tracks stats separately for each, so you can see per-agent breakdowns on your dashboard.

Is BashStats free?

Yes. BashStats is completely free and open source under the MIT license. Local tracking, the CLI dashboard, browser dashboard, achievements, cloud sync, public profiles, and the global leaderboard are all included at no cost.

What achievements can I earn in BashStats?

BashStats has 124+ achievements across categories like sessions, streaks, token usage, commits, and late-night coding. Badges are tiered from Bronze through Silver, Gold, Diamond, and up to rare titles like System Anomaly. Track your progress with CLI progress bars or on your hosted profile.

Where is my BashStats data stored?

All stats are stored locally in a SQLite database on your machine. Nothing leaves your computer unless you choose to sync by running bashstats login and bashstats share. You control what's public, what's hidden, and what stays fully anonymous.

How does BashStats track my coding sessions?

BashStats installs lightweight hooks that detect when a CLI coding agent starts and ends a session. It records prompts, tool calls, tokens used, and session duration automatically. You can view stats with bashstats stats in your terminal or launch the full dashboard with bashstats web.

Can I compete with other developers on BashStats?

Yes. Sign in with GitHub using bashstats login, then run bashstats share to upload your stats. You'll get a public profile at bashstats.com/u/username and appear on the global leaderboard, sortable by XP, rank, sessions, streaks, badges, and token usage.