Track and analyze AI usage from Cursor IDE and Claude Code
npm install pricepertoken-ai-coding-trackerTrack and analyze your AI usage from Cursor IDE and Claude Code with detailed analytics and cost monitoring.
``bash`
npm install -g pricepertoken-ai-coding-tracker
Note: This package requires Python 3.8+ to be installed on your system. The installer will automatically install the required Python dependencies.
1. Try local mode first (no account required):
`bash`
pricepertoken-ai-coding-tracker --local
2. For dashboard mode (account required):
- Register at [https://pricepertoken.com/coding-tracker/]
- Get your API token from the dashboard
- Configure: pricepertoken-ai-coding-tracker --configure YOUR_API_TOKENpricepertoken-ai-coding-tracker --live
- Run:
View your usage data locally without sending it anywhere:
`bash`Monitor both Cursor and Claude usage locally
pricepertoken-ai-coding-tracker --local
This will continuously monitor your usage and display summaries locally.
Send your usage data to your personal dashboard:
`bash`Monitor and send data to dashboard
pricepertoken-ai-coding-tracker --live
This will continuously monitor your usage and send data to your dashboard.
Set up your API token for dashboard mode:
`bash`Save your API token
pricepertoken-ai-coding-tracker --configure YOUR_API_TOKEN
| Command | Description |
|---------|-------------|
| --local | Monitor usage locally (no API calls) |--live
| | Monitor usage and send to dashboard |--configure TOKEN
| | Save API token for dashboard mode |--help
| | Show all available options |
- Local Mode: Your data never leaves your machine
- Dashboard Mode: Data is sent securely to your personal dashboard
- Open Source: Full transparency - inspect the code yourself
- Your Control: Revoke access anytime from your dashboard
`bashSet custom Django server URL
export DJANGO_API_URL="https://api.pricepertoken.com"
$3
The CLI stores your configuration in
~/.ai-usage-tracker/config📋 Requirements
- Python 3.8+ (automatically checked during installation)
- Node.js 14+ (for npm installation)
- Cursor IDE (for Cursor usage tracking)
- Claude Code CLI (for Claude usage tracking)
🐛 Troubleshooting
$3
If you see dependency errors like "No module named 'httpx'":
`bash
Install required Python packages
pip install httpx==0.25.2 PyJWT==2.8.0Or reinstall the npm package to trigger dependency installation
npm install -g pricepertoken-ai-coding-tracker
`$3
If Python is not found:
1. Install Python 3.8+ from https://www.python.org/downloads/
2. Make sure
python3 or python is in your PATH
3. Reinstall the npm package: npm install -g pricepertoken-ai-coding-tracker$3
On macOS/Linux, you might need to run:
`bash
sudo npm install -g pricepertoken-ai-coding-tracker
`$3
If you get authentication errors:
1. Check your token at [https://pricepertoken.com/coding-tracker/]
2. Reconfigure:
pricepertoken-ai-coding-tracker --configure NEW_TOKEN$3
If you hit rate limits:
- Wait a few minutes before trying again
- Use
--local` mode to view data without API callsThis is an open-source project! Contributions welcome:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request
MIT License - see LICENSE file for details
- Dashboard: https://pricepertoken.com/coding-tracker/
- GitHub: https://github.com/ellmanalex/pricepertoken-ai-coding-tracker
- Issues: https://github.com/ellmanalex/pricepertoken-ai-coding-tracker/issues
---
Made with ❤️ for the AI development community