npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hasna/economy

v0.2.10

Published

AI coding cost tracker — CLI + MCP server + REST API + web dashboard for Claude Code, Codex, and Gemini

Downloads

1,298

Readme

@hasna/economy

AI coding cost tracker for Claude Code, Codex, and Gemini.

Track every dollar spent across all your AI coding sessions — per request, per session, per project, per day.

Features

  • Claude Code — exact costs from telemetry JSONL (costUSD per request)
  • Codex — estimated costs from token count × model pricing
  • SQLite backend — all data stored locally at ~/.economy/economy.db
  • DB-backed pricing — model rates editable via CLI, seeded from defaults
  • CLIeconomy sync, economy today, economy sessions, economy watch, etc.
  • Live watcheconomy watch streams costs as they arrive
  • Budgets — set per-project or global budgets with alert thresholds
  • MCP server — agents can query their own costs
  • REST APIeconomy serve on port 3456
  • Web dashboard — charts, sessions table, model/project breakdown
  • macOS menubar — live cost display in your menu bar
  • SDK@hasna/economy-sdk for programmatic access

Install

bun add -g @hasna/economy
economy sync
economy today

Usage

economy sync              # ingest Claude Code + Codex data
economy today             # today's cost summary
economy week              # this week
economy month             # this month
economy sessions          # list sessions with costs
economy top               # most expensive sessions
economy watch             # live cost stream
economy breakdown         # by model/agent/project
economy budget set --period monthly --limit 100
economy budget list
economy project add /path/to/project --name "My Project"
economy pricing list
economy pricing set gpt-4o --input 2.50 --output 10.00
economy serve             # start REST API on port 3456
economy dashboard         # open web dashboard
economy mcp --all         # show MCP install commands

MCP Server

claude mcp add --transport stdio --scope user economy -- economy-mcp

SDK

import { EconomyClient } from '@hasna/economy-sdk'

const client = new EconomyClient()
const today = await client.getSummary('today')
console.log(`Today's cost: $${today.total_usd.toFixed(4)}`)

License

Apache-2.0