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

@rezaiyan/ledger

v0.1.13

Published

Claude Code cost + session intelligence tool

Downloads

1,267

Readme

Ledger

npm License: MIT

Track Claude Code costs and work sessions — terminal dashboard, web UI, and slash commands in one tool.

Install

npm install -g @rezaiyan/ledger

Quick Start

npm install
npm run ledger        # print cost report and exit
npm run dev           # web dashboard at http://localhost:4200

CLI Commands

| Command | Description | |---|---| | ledger | Print cost report and exit | | ledger tui | Launch interactive TUI dashboard | | ledger status | Print current session status line | | ledger status -s | Ultra-compact format for shell prompt | | ledger today | Print today's cost summary | | ledger last | Show last completed conversation | | ledger sessions | Table of recent sessions (last 10) | | ledger sessions --type <type> | Filter sessions by type | | ledger open | Start server and open browser dashboard | | ledger start | Alias for open |

Global options: --dir <path> (JSONL source, default ~/.claude/projects), --port <number> (default 4200), --sessions-dir <path> (default ./sessions).

Slash Commands

Place these in your project's commands/ directory. Invoke them in Claude Code as /project:session-*.

| Command | Description | |---|---| | /project:session-start [type] [goal] | Start a session with pre-flight cost suggestions from similar past sessions | | /project:session-update [note] | Append a timestamped progress note (with git state) to the active session | | /project:session-end | Close the session, calculate duration, extract lessons, add summary | | /project:session-check | Show current cost vs. average of similar sessions | | /project:session-review [N] | Generate an efficiency report across the last N sessions (default 20) | | /project:session-lessons | Re-extract and update lessons from the current or most recent session |

Session types: feature, bug, refactor, explore, research (default: other).

How It Works

Ledger reads Claude Code's JSONL conversation logs from ~/.claude/projects/ and parses cost, token, model, and timing data directly — no API key required. The Express server (server/server.ts) exposes this data via a REST API at /api/summary, /api/conversations, /api/sessions, and /api/status. The web frontend (React + Recharts + Vite) and TUI (Ink) both consume this API.

Work sessions are Markdown files written to ./sessions/ with YAML frontmatter. The slash commands are natural-language instruction files that Claude Code executes — they read and write these session files to track progress, costs, commits, and lessons over time.

License

MIT — see LICENSE.

Credits

Built on patterns from: