
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
cursor-usage
Advanced tools

A CLI tool for analyzing Cursor API usage and membership information, inspired by ccusage.
npm install
You can test the package without installing it locally using npx or bunx:
# Test with npx (Node.js)
npx cursor-usage@latest
# Test with bunx (Bun runtime)
bunx cursor-usage@latest
# Test specific commands
npx cursor-usage@latest daily
npx cursor-usage@latest monthly
# Test with flags
npx cursor-usage@latest daily --breakdown
npx cursor-usage@latest weekly --json
# Show current billing summary (default)
npm run dev
# Show daily usage for last 7 days (default)
npm run dev -- daily
# Show daily usage for last N days
npm run dev -- daily 30
npm run dev -- d 7 # Alias
# Show monthly usage for last 3 months (default)
npm run dev -- monthly
# Show monthly usage for last N months
npm run dev -- monthly 6
npm run dev -- m 12 # Alias
# Show detailed usage for today
npm run dev -- today
# Show help
npm run dev -- help
# Show usage with date range
npm run dev -- daily --since 2026-01-01 --until 2026-01-15
# Show usage with model breakdown
npm run dev -- daily --breakdown
# Show compact table format
npm run dev -- monthly --compact
# Output as JSON (detailed reports only)
npm run dev -- daily --json
--since DATE - Start date (YYYY-MM-DD)--until DATE - End date (YYYY-MM-DD)--breakdown - Show per-model breakdown--json - Output as JSON (machine-readable format)--compact - Compact table formatnpm run dev # Run with tsx (default summary)
npm start # Run with tsx (default summary)
npm run build # Compile TypeScript
╭────────────────────────────────────────╮
│ Cursor Usage Summary │
╰────────────────────────────────────────╯
📋 ACCOUNT INFORMATION
Membership: pro
Billing Cycle: Dec 29, 2025 to Jan 29, 2026
📊 PLAN USAGE
Used: 150 / 2000 (7.50%)
Remaining: 1850
Breakdown:
- Included: 150
- Bonus: 0
- Total: 150
╭──────────────────────────────────────────────╮
│ Cursor Usage Report - Daily (Last 7 days) │
╰──────────────────────────────────────────────╯
┌────────────┬────────┬──────────────┬───────┬────────┬───────┬──────────────────────────────────┐
│ Date │ Events │ Total Tokens │ Input │ Output │ Cost │ Models │
├────────────┼────────┼──────────────┼───────┼────────┼───────┼──────────────────────────────────┤
│ 2026-01-11 │ 3 │ 539,301 │ 381 │ 7,081 │ $0.82 │ claude-4.5-opus-high-thinking(3) │
├────────────┼────────┼──────────────┼───────┼────────┼───────┼──────────────────────────────────┤
│ Total │ 3 │ 539,301 │ 381 │ 7,081 │ $0.82 │ │
└────────────┴────────┴──────────────┴───────┴────────┴───────┴──────────────────────────────────┘
╭────────────────────────────────────────────────────╮
│ Cursor Usage Report - Monthly (Last 3 months) │
╰────────────────────────────────────────────────────╯
┌──────────┬────────┬───────────────┬─────────┬─────────┬────────┬─────────────────────┐
│ Month │ Events │ Total Tokens │ Input │ Output │ Cost │ Models │
├──────────┼────────┼───────────────┼─────────┼─────────┼────────┼─────────────────────┤
│ 2026-01 │ 50 │ 5,000,000 │ 50,000 │ 30,000 │ $4.50 │ claude-sonnet(50) │
├──────────┼────────┼───────────────┼─────────┼─────────┼────────┼─────────────────────┤
│ 2025-12 │ 75 │ 8,500,000 │ 75,000 │ 45,000 │ $6.80 │ claude-opus(75) │
├──────────┼────────┼───────────────┼─────────┼─────────┼────────┼─────────────────────┤
│ 2025-11 │ 25 │ 2,500,000 │ 20,000 │ 10,000 │ $2.00 │ claude-haiku(25) │
├──────────┼────────┼───────────────┼─────────┼─────────┼────────┼─────────────────────┤
│ Total │ 150 │ 16,000,000 │ 145,000 │ 85,000 │ $13.30 │ │
└──────────┴────────┴───────────────┴─────────┴─────────┴────────┴─────────────────────┘
╭─────────────────────────────────────────╮
│ Cursor Usage Report - Sun Jan 11 2026 │
╰─────────────────────────────────────────╯
┌──────────┬───────────────┬───────┬──────────────┬───────────────┬──────────────┬─────────┐
│ Time │ Model │ Type │ Input Tokens │ Output Tokens │ Total Tokens │ Cost │
├──────────┼───────────────┼───────┼──────────────┼───────────────┼──────────────┼─────────┤
│ 2:15 pm │ claude-opus │ usage │ 500 │ 1,200 │ 1,700 │ $0.0850 │
├──────────┼───────────────┼───────┼──────────────┼───────────────┼──────────────┼─────────┤
│ 1:45 pm │ claude-sonnet │ usage │ 300 │ 800 │ 1,100 │ $0.0440 │
├──────────┼───────────────┼───────┼──────────────┼───────────────┼──────────────┼─────────┤
│ 1:20 pm │ claude-haiku │ usage │ 100 │ 250 │ 350 │ $0.0070 │
├──────────┼───────────────┼───────┼──────────────┼───────────────┼──────────────┼─────────┤
│ Total │ │ │ 900 │ 2,250 │ 3,150 │ $0.14 │
└──────────┴───────────────┴───────┴──────────────┴───────────────┴──────────────┴─────────┘
--breakdown)When using --breakdown, reports include a detailed per-model breakdown:
╭────────────────────────────────────────╮
│ PER-MODEL BREAKDOWN │
╰────────────────────────────────────────╯
┌───────────────┬────────┬──────────────┬─────────┬─────────┬───────┬─────────┬────────┐
│ Model │ Events │ Total Tokens │ Input │ Output │ Cost │ Token % │ Cost % │
├───────────────┼────────┼──────────────┼─────────┼─────────┼───────┼─────────┼────────┤
│ claude-opus │ 15 │ 2,500,000 │ 20,000 │ 15,000 │ $2.00 │ 50.00% │ 40.00% │
├───────────────┼────────┼──────────────┼─────────┼─────────┼───────┼─────────┼────────┤
│ claude-sonnet │ 10 │ 2,000,000 │ 15,000 │ 12,000 │ $1.60 │ 40.00% │ 32.00% │
├───────────────┼────────┼──────────────┼─────────┼─────────┼───────┼─────────┼────────┤
│ claude-haiku │ 5 │ 500,000 │ 5,000 │ 3,000 │ $0.40 │ 10.00% │ 8.00% │
└───────────────┴────────┴──────────────┴─────────┴─────────┴───────┴─────────┴────────┘
--json)JSON output provides clean, structured data for programmatic use (no table formatting):
{
"command": "daily",
"generatedAt": "2026-01-11T10:30:00.000Z",
"period": "last 7 days",
"summary": {
"totalEvents": 45,
"totalTokens": 539301,
"totalCost": 0.82
},
"data": [
{
"date": "2026-01-11",
"eventCount": 3,
"totalTokens": 539301,
"inputTokens": 381,
"outputTokens": 7081,
"totalCost": 0.82,
"models": {
"claude-4.5-opus-high-thinking": 3
}
}
],
"breakdown": [
{
"model": "claude-opus",
"count": 15,
"totalTokens": 250000,
"inputTokens": 20000,
"outputTokens": 15000,
"totalCost": 2.0,
"tokenPercent": 50.0,
"costPercent": 40.0
}
]
}
╭─────────────────────────────────────────────────╮
│ Cursor Usage Report - Weekly (Last 4 weeks) │
╰─────────────────────────────────────────────────╯
┌─────────────────────────┬────────┬──────────────┬─────────┬─────────┬────────┬─────────────────────┐
│ Week │ Events │ Total Tokens │ Input │ Output │ Cost │ Models │
├─────────────────────────┼────────┼──────────────┼─────────┼─────────┼────────┼─────────────────────┤
│ 2026-01-06 - 2026-01-12 │ 25 │ 3,500,000 │ 35,000 │ 21,000 │ $3.50 │ claude-opus(25) │
├─────────────────────────┼────────┼──────────────┼─────────┼─────────┼────────┼─────────────────────┤
│ 2025-12-30 - 2026-01-05 │ 40 │ 5,200,000 │ 52,000 │ 31,200 │ $5.20 │ claude-sonnet(40) │
├─────────────────────────┼────────┼──────────────┼─────────┼─────────┼────────┼─────────────────────┤
│ Total │ 65 │ 8,700,000 │ 87,000 │ 52,200 │ $8.70 │ │
└─────────────────────────┴────────┴──────────────┴─────────┴─────────┴────────┴─────────────────────┘
CURSOR_DATA_DIR - Custom path to Cursor data directory (optional)DEBUG - Enable debug loggingsrc/
├── index.ts # CLI entry point & display logic
├── data-loader.ts # Database extraction & API fetching
├── logger.ts # Colored logging utilities
├── _types.ts # TypeScript type definitions
└── _consts.ts # Constants & configuration
--breakdown flag--since and --untilMIT
FAQs
CLI tool for analyzing Cursor usage and token consumption
We found that cursor-usage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.