token-time-tracker
v1.0.3
Published
Uses ccusage to get Claude Code spending on MAX plan and pushes it to tokenti.me API.
Maintainers
Readme
TokenTi.me Tracker
Pulls your Claude Code token usage and costs from local JSONL files (using ccusage) and pushes them to TokenTi.me API for web analytics. Hevaily inspired and built on top of ccusage.
Installation
npm install -g token-time-trackerOr use directly with npx:
npx token-time-tracker <userId> [--test]Usage
Production Mode
token-time-tracker <userId>This will fetch your Claude Code usage data and send it to the TokenTi.me API endpoint. You can get your userId from the Token Time Website.
Test Mode
token-time-tracker <userId> --testIn test mode, the tool will send data to http://localhost:3000/api instead of the production API.
What it does
- Fetches your Claude Code usage data using
ccusage - Parses the daily usage statistics
- Sends the data to an API endpoint with the following format:
{
"userId": "your-user-id",
"data": {
"daily": [
// Daily usage data from ccusage
]
}
}Requirements
- Node.js 14 or higher
- Claude Code must be installed and configured
License
MIT
