SShortSingh.
Back to feed

Developer builds open-source CLI tool to track AI API spending by project and model

0
·1 views

A developer created AICostTracker, a local command-line tool that logs AI API usage and breaks down costs by project and model, after growing frustrated with opaque billing dashboards from providers like OpenAI. The tool runs entirely on the user's machine, storing data in a local JSONL file rather than a cloud service. It supports pricing for major AI providers including OpenAI, Anthropic, and Google, as well as local Ollama models. Users manually log each API call with details such as token counts and project name, then run a summary command to view spending patterns. The tool is available as an npm package on GitHub, with automatic API call interception planned as a future feature.

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 ·

A self-referencing checklist instruction kept 90 documents permanently marked unfinished

A developer discovered that a document pipeline was incorrectly flagging all 90 generated files as incomplete scaffolds rather than finished drafts. The bug stemmed from the completion checklist itself, which contained the exact marker symbols the parser used to detect unfinished files, making the exit condition logically impossible to satisfy. Because the instruction line explaining how to remove the markers also contained those markers, every generated file was born permanently unfinished by design. The issue had gone unnoticed for some time, as a dashboard showing a large backlog of pending documents had been routinely ignored. The fix involved rewriting the checklist instruction to describe the markers in plain language rather than embed them directly, which instantly reclassified 37 of the 90 files as complete.

0
ProgrammingHacker News ·

Researchers Publish Framework Classifying AI-Driven Extinction Risk Scenarios

A new academic paper published on arXiv presents a structured taxonomy of potential futures in which artificial intelligence could contribute to human extinction or civilizational collapse. The research systematically categorizes different pathways through which advanced AI systems might pose omnicidal risks. The work appears aimed at helping researchers and policymakers better understand and distinguish between various catastrophic AI risk scenarios. By organizing these scenarios into a clear framework, the authors seek to advance more rigorous analysis of existential threats linked to AI development.

0
ProgrammingDEV Community ·

AMD's Advancing AI 2026 Summit Highlights Hardware-Software Symbiosis and CUDA Alternatives

AMD held its Advancing AI 2026 summit at the Moscone Center in San Francisco, offering free access to keynotes, tech talks, and vendor sessions. A day-one panel featured Chris Lattner, creator of the LLVM compiler infrastructure, who argued that hardware and software must be reasoned about together rather than in isolation. Lattner suggested that CUDA's dominance mirrors the legacy grip of GCC and can be bypassed through better architecture rather than direct competition, a philosophy behind his Mojo language at Modular. Panelist Ramin Hasani emphasized approaching AI problems at the algorithmic level before turning to hardware optimizations, and pointed to liquid foundation models as an area of interest beyond standard transformer architectures. The event reflected the broader industry trend of companies investing heavily in free developer education to drive ecosystem adoption.

0
ProgrammingDEV Community ·

Developer Builds Playable Snake Game Using 576 Simultaneous Browser Windows

A developer has created a fully playable Snake game that runs across 576 individual browser windows, each acting as a pixel on the game grid. The project exploits the ability to programmatically control the size, position, and content of browser windows through JavaScript, as long as the user permits popups. The game is controlled via arrow keys and has only been tested on Chrome for Windows, with the developer warning it is highly demanding on both the eyes and the PC. Beyond the novelty, the developer also highlighted a practical real-world use case: using two coordinated browser windows to review and validate third-party links without relying on iframes, which some sites block. The project demonstrates the broader potential of multi-window browser control for building tool editors, multi-screen applications, and other split-interface workflows.

Developer builds open-source CLI tool to track AI API spending by project and model · ShortSingh