tokeneff: Open-Source CLI Tool Tracks LLM API Costs Locally in Real Time
Developers have released tokeneff, a free open-source command-line tool that monitors large language model API spending in real time without sending data to external servers. The tool runs a lightweight local proxy on localhost:7860, intercepting LLM responses to count tokens and calculate costs using a bundled pricing table stored in a local SQLite database. It supports multiple providers including OpenAI, Anthropic, DeepSeek, and GLM, and separately tracks spending in USD and CNY to avoid mixing costs across regions. A standout feature is its month-end spending forecast, which uses a weighted algorithm combining seven days of usage history and linear extrapolation to predict total monthly costs with a confidence score. API keys are stored in the OS keyring and prompt content is never logged, making it a privacy-focused alternative to cloud-based cost trackers.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in