SShortSingh.
Back to feed

tokeneff: Open-Source CLI Tool Tracks LLM API Costs Locally in Real Time

0
·41 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Why Multi-Agent Architectures Beat Monolithic Prompts for AI Automation

Developers building AI-powered automation often start with one large prompt that handles parsing, classification, lookups, and response drafting in a single call. As business logic grows, this monolithic approach tends to miss instructions, hallucinate edge cases, and waste tokens on simple subtasks. The article argues that, much like backend microservices, splitting work across specialized agents with clear interfaces yields more reliable results. It proposes a pipeline of parser, router, and execution agents that pass typed, structured data between steps, which also makes failures easier to debug. A Python example using Pydantic schemas illustrates how an analyzer agent hands off a classified ticket to a technical support agent.

0
ProgrammingDEV Community ·

WordPress 7.1.5 fixes 19 security advisories, five rated high severity

WordPress 7.1.5, released on November 18, 2026, patches 19 security advisories, five of which are classified as high severity. Fixes were also backported to every branch down to 4.7, so sites on older versions can apply the repair without moving to 7.1. The advisories were published as GitHub Security Advisories without CVE identifiers. Among the high-severity issues are privilege escalation via Template Part block attributes, stored scripts through comment shortcodes, and cross-site scripting flaws in the legacy media library and block editor. Site owners are advised to prioritize sites accepting comments, running multisite networks, or having external contributor accounts, and to verify whether the /xmlrpc.php endpoint is publicly reachable.

0
ProgrammingDEV Community ·

Curl flags that break when translated into application code

Developers often introduce bugs when converting curl examples from API docs into Python, JavaScript, or Go by hand. The -d flag silently switches the request to POST with a form content type, so JSON bodies need an explicit header or the newer --json option. The -G flag moves data into query parameters, while -u builds Basic auth and -F sends multipart form data with file uploads. Flags like -k, --compressed, and browser-copied headers also behave differently across libraries and environments. The author also released a free browser-based converter that produces code in several languages and was tested against an echo server.

0
ProgrammingDEV Community ·

Bastion brings live CVE triage into Jira for the Codegeist 2026 hackathon

A developer submitted Bastion, a Jira-integrated security triage tool, to the Codegeist 2026 hackathon to address the gap between security findings and engineering tickets. The tool combines a Jira issue panel that detects CVE mentions and scans for risk, a Rovo agent and MCP tools that query the NVD API at request time, and a daily scheduled job that labels unlabelled CVE issues. Its risk score is deterministic and severity-weighted, and it avoids fabricating data when NVD has no record. The developer has no production user feedback yet and is seeking input on where Jira-based security workflows break down.