Back to feed
Dev.to
Dev.to
7/10/2026
The original title is: "Track Every LLM Token in Node.js with all-llm-token-tracker"

The original title is: "Track Every LLM Token in Node.js with all-llm-token-tracker"

Original: Track Every LLM Token in Node.js with all-llm-token-tracker

Short summary

all-llm-token-tracker is a lightweight npm package for tracking input and output tokens across LLM API calls in Node.js, with pluggable storage (memory, file, MongoDB) and built-in extractors for OpenAI and Anthropic. It auto-wraps existing LLM calls, records per-call usage with metadata, and provides queryable summaries by model or provider plus a browser dashboard. Custom storage adapters and usage extractors make it provider-agnostic for production cost monitoring, debugging, and billing workflows.

  • Tracks input/output tokens per LLM call with pluggable storage (memory, file, MongoDB)
  • Built-in extractors for OpenAI and Anthropic; custom extractors supported
  • Includes queryable summaries, browser dashboard, and zero required runtime deps

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more