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

codex-observatory

v1.2.15

Published

Production-style local observability and stats dashboard for Codex.

Readme

Codex Observatory

Local stats dashboard for Codex. Read usage directly from machine logs, estimate API spend from model pricing, and use codex stats like it was built into Codex.

CI Release Node

Quickstart

Works on:

  • Windows x64 and arm64
  • macOS Intel and Apple Silicon
  • Linux x64 and arm64

Requirements:

  • Node.js 18+
  • Codex already installed on the machine

Install once:

npm install -g codex-observatory

Then use it like this:

codex stats
codex stats compact
codex stats full
codex stats --json

Time range examples:

codex stats --day 2026-04-29
codex stats --days 14
codex stats --month 2026-04
codex stats --months 12
codex stats --year 2026
codex stats --from 2026-04-01 --to 2026-04-15

Use --day for one date, --month for daily detail inside one month, --year for a 12-month view, and --from/--to for an inclusive custom date range.

Global npm install auto-runs the Codex integration step and patches the local codex launcher so codex stats works immediately.

If your npm install was run with scripts disabled, or Codex was not installed yet, repair the setup with:

codex-observatory install-codex --patch-codex

Commands

| Command | Description | | --- | --- | | codex stats | Recommended dashboard command | | codex stats compact | Short dashboard | | codex stats full | Detailed dashboard | | codex stats --json | JSON output including cost and pricing metadata | | codex stats --day YYYY-MM-DD | One day with daily token detail | | codex stats --month YYYY-MM | One month with daily and monthly token detail | | codex stats --year YYYY | One calendar year with monthly token detail | | codex stats --from YYYY-MM-DD --to YYYY-MM-DD | Inclusive custom date range | | codex-observatory install-codex --patch-codex | Reinstall or repair the Codex launcher patch | | codex-observatory uninstall-codex | Remove the Codex integration and restore launcher backups |

Direct Aliases

These direct commands are still available and map to the same dashboard:

  • codex-observatory
  • codex-stats

Examples:

codex-observatory compact
codex-stats --json

Clean Uninstall

codex-observatory uninstall-codex
npm uninstall -g codex-observatory

The first command removes the Codex integration and restores the patched codex launcher. The second command removes the global npm package.

Notes

  • npm install -g codex-observatory is the main supported user flow.
  • npm uninstall -g codex-observatory removes the npm package itself, but npm does not run uninstall lifecycle hooks for packages. Run codex-observatory uninstall-codex first for a clean rollback.
  • npm installs download the matching native binary automatically.
  • If history.jsonl is missing, Codex Observatory rebuilds prompt history from session logs.
  • If sessions/ is missing but history.jsonl exists, Codex Observatory still renders prompt and session counts and falls back to zero token totals plus unknown model metadata.
  • Estimated spend uses built-in OpenAI API pricing by model, billing uncached input, cached input, and output separately.
  • GPT-5.5 pricing is included, with long-context rates applied for configured frontier models when a token event exceeds 272K input tokens.
  • Period, model, daily, monthly, and day-of-week tables expose input, cached input, output, reasoning, and total token detail where session logs contain token counts.
  • Spend figures are API-equivalent estimates only and may not match Codex app or subscription billing.
  • Pricing coverage is reported explicitly so unknown or unsupported models do not silently skew totals.

Docs