npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

track-my-prompts

v0.1.1

Published

Track your AI coding prompt activity — locally and on the global leaderboard

Readme

track-my-prompts

Strava for AI-assisted coding. Track your prompt activity across AI coding tools, earn milestone badges, and compete on a global leaderboard.

npm install -g track-my-prompts

What it does

track-my-prompts parses your Claude Code session files, extracts prompt metrics (count, tool calls, subagent calls, duration, velocity), stores everything locally in SQLite, and serves a beautiful dark-themed dashboard. Optionally sync to a global leaderboard where builders compete and inspire each other.

Privacy first: Only metrics are tracked. Prompt content, file paths, and code are never stored or transmitted.

Quick start

# Install globally
npm install -g track-my-prompts

# Navigate to any project that has Claude Code sessions
cd ~/my-project

# Scan your Claude Code sessions
tmp scan

# See your stats
tmp stats

# Launch the web dashboard
tmp dashboard

The dashboard opens at http://localhost:3141 with your project analytics, activity heatmap, and milestone progress.

CLI commands

| Command | Description | |---|---| | tmp init | Initialize tracking for the current project | | tmp scan | Scan Claude Code sessions and import prompt data | | tmp status | Quick overview of current project status | | tmp stats | Detailed stats with tables and charts | | tmp watch | Watch for new prompts in real-time | | tmp dashboard | Launch the web dashboard on localhost:3141 | | tmp register | Register for the global leaderboard | | tmp sync | Sync your stats to the global leaderboard | | tmp leaderboard | View the global leaderboard in your terminal |

Scanning

# Scan current project
tmp scan

# Output:
# Scanning sessions for: my-project
# Scan complete!
# Sessions scanned: 12
# New prompts: 47
# Total prompts: 203
#
# Achievement unlocked: Building Momentum!
# +47 new prompts recorded. Total: 203. Don't give up too early.

The scanner automatically finds Claude Code session files at ~/.claude/projects/<encoded-path>/ and parses the JSONL format to extract:

  • Human prompts (filtered from tool results and system messages)
  • Tool call counts per response
  • Subagent invocations
  • Session duration and per-prompt timing
  • Model information

Watch mode

tmp watch

Monitors your Claude Code sessions in real-time. See your prompt count tick up live, get notified when you hit milestones, and never lose track of your progress.

Global leaderboard

# Register with your username and GitHub handle
tmp register

# Sync your stats (only metrics — never prompt content)
tmp sync

# View the leaderboard
tmp leaderboard

You can also enable auto-sync so your stats are pushed after every scan:

tmp dashboard  # Go to Settings > Enable Auto-sync

Dashboard

Launch with tmp dashboard and open http://localhost:3141.

Home page

  • Total prompts, sessions, tool calls across all projects
  • GitHub-style activity heatmap showing your daily prompt activity
  • Project cards with current badge and progress to next milestone
  • Week-over-week trend comparison

Project detail

  • Deep stats: prompts per session, average duration, prompt velocity (prompts/hour)
  • Badge strip showing earned and upcoming milestones
  • Activity heatmap for this project
  • Prompts-over-time line chart
  • Tool usage breakdown (donut chart)
  • Session history with pagination

Leaderboard

  • Top builders ranked by total prompts
  • Tool-type filter (Claude Code, Cursor)
  • Sort by prompts, streak, or sessions
  • Search by username
  • "That's you!" highlight when you're on the board

Settings

  • Profile: username, GitHub handle
  • Auto-sync toggle
  • Share project names toggle (opt-in)
  • Dark mode (enabled by default)

Motivational system

track-my-prompts is built around the idea that most builders give up too early. The motivational system encourages you to push past 300-500 prompts per project — where real results happen.

Milestone badges

| Badge | Threshold | Emoji | |---|---|---| | Getting Started | 50 prompts | :seedling: | | Finding Your Flow | 100 prompts | :ocean: | | Building Momentum | 200 prompts | :rocket: | | Committed Builder | 300 prompts | :hammer: | | Prompt Master | 500 prompts | :star: | | Relentless | 1,000 prompts | :fire: |

Streak badges

| Badge | Threshold | Emoji | |---|---|---| | On a Roll | 3 consecutive days | :dart: | | Week Warrior | 7 consecutive days | :crossed_swords: | | Unstoppable | 14 consecutive days | :muscle: | | Monthly Master | 30 consecutive days | :crown: |

Badges are awarded per-project and announced in the CLI when you scan.

How it works

Architecture

┌──────────────────────┐     ┌─────────────────────┐
│   Claude Code        │     │   Global API         │
│   ~/.claude/projects │     │   (Hono + Postgres)  │
│   *.jsonl files      │     │                      │
└─────────┬────────────┘     └──────────▲───────────┘
          │ parse                       │ sync (opt-in)
          ▼                             │
┌──────────────────────┐     ┌──────────┴───────────┐
│   CLI (tmp)          │────▶│   Local API Server   │
│   scan/stats/watch   │     │   Express :3141      │
│   SQLite storage     │     │   + React Dashboard  │
└──────────────────────┘     └──────────────────────┘
  • CLI: Node.js CLI built with Commander. Parses Claude Code JSONL session files using streaming readline.
  • Local storage: SQLite via better-sqlite3. Stores projects, sessions, individual prompts, daily stats, and milestones. Located at ~/.track-my-prompts/data.db.
  • Dashboard: React 18 + Vite + Tailwind CSS. Dark theme with Inter + JetBrains Mono fonts. Bundled into the CLI package as static files.
  • Local API: Express server on port 3141. Serves the dashboard and provides REST endpoints for all local data.
  • Global API: Hono + Neon Postgres. Hosted separately. Receives anonymized metrics via sync, serves the leaderboard.

What gets tracked

Per prompt:

  • Timestamp
  • Duration (ms)
  • Tool calls triggered
  • Subagent calls triggered
  • Model used

Per session:

  • Start/end time
  • Total duration
  • Prompt count
  • Tool call count
  • Subagent count

Per project (aggregated):

  • Total prompts, sessions, tool calls, subagent calls
  • Daily activity (for heatmap and streaks)
  • Milestone achievements
  • Prompt velocity (prompts per hour)

What is NEVER tracked

  • Prompt content (what you typed)
  • AI response content
  • File paths or code
  • Project directory paths (only project name, and only if you opt in to sharing)

Configuration

Config is stored at ~/.track-my-prompts/config.json:

{
  "token": null,
  "username": null,
  "githubHandle": null,
  "globalApiUrl": "https://track-my-prompts.vercel.app",
  "autoSync": false,
  "shareProjectNames": false
}

| Field | Description | |---|---| | token | Auth token for global leaderboard (set via tmp register) | | username | Your display name on the leaderboard | | githubHandle | Your GitHub username (shown on leaderboard) | | globalApiUrl | URL of the global API server | | autoSync | Automatically sync after each scan | | shareProjectNames | Include project names in sync data (default: false) |

Development

Prerequisites

  • Node.js >= 18
  • npm

Setup

git clone https://github.com/the-wise-agents/track-my-prompts.git
cd track-my-prompts
npm install

Project structure

packages/
  cli/          # CLI + local API server (npm package)
  dashboard/    # React web dashboard
  server/       # Global leaderboard API (Hono + Neon)
tests/
  unit/         # Unit tests (vitest)
  integration/  # API integration tests
  e2e/          # E2E tests (Playwright)

Build

# Build dashboard
cd packages/dashboard && npm run build

# Build CLI
cd packages/cli && npx tsup

# Or build both (CLI prebuild script builds dashboard first)
cd packages/cli && npm run build

Test

# Run all tests from project root
npx vitest run

# 129 tests across 23 files

Local development

# Build dashboard
cd packages/dashboard && npm run build

# Run CLI commands directly
cd packages/cli && node dist/index.js scan
cd packages/cli && node dist/index.js dashboard

Supported AI tools

| Tool | Status | How it works | |---|---|---| | Claude Code | Supported | Parses JSONL session files from ~/.claude/projects/ | | Cursor | Planned (v2) | TBD |

Global API

The global API server handles registration, sync, and leaderboard queries. It's built with Hono and uses Neon Postgres for storage.

Endpoints

| Method | Path | Description | |---|---|---| | POST | /api/register | Register a new user | | POST | /api/sync | Sync project metrics | | GET | /api/leaderboard | Get leaderboard entries | | GET | /api/me | Get your own stats |

Self-hosting

The global API is designed to run on Vercel with a Neon Postgres database. To self-host:

  1. Create a Neon Postgres database
  2. Set DATABASE_URL in your environment
  3. Deploy packages/server/ to Vercel (or any Node.js host)
  4. Update globalApiUrl in your local config

Requirements

  • Node.js >= 18.0.0
  • macOS, Linux, or Windows
  • Claude Code installed (for session data)

License

MIT