I kept overrunning my Anthropic/OpenAI budget by guessing token counts
before sending big prompts. So I built llm-tokencheck, a free CLI
that estimates tokens + USD cost for a file or text across Anthropic,
OpenAI and Google models before you make the API call.
```bash
npm install -g llm-tokencheck
tokencheck myfile.txt
```
It prints a cost table across models so you can pick the cheapest one
that fits, or just sanity-check a big request before sending it.
There's an optional $9 Pro license (`--activate`) that unlocks batch
processing of a whole folder + CSV export โ useful if you're auditing
costs across a codebase or a dataset.
- GitHub: https://github.com/ilan-lachkar/llm-tokencheck
- npm: https://www.npmjs.com/package/llm-tokencheck
Feedback welcome, especially on pricing accuracy for newer models.
Top comments (0)