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.
npm install -g token-time-trackerOr use directly with npx:
npx token-time-tracker <userId> [--test]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.
token-time-tracker <userId> --testIn test mode, the tool will send data to http://localhost:3000/api instead of the production API.
- 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
]
}
}- Node.js 14 or higher
- Claude Code must be installed and configured
MIT