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

llm-logs-dashboard

v0.1.0

Published

Local, read-only web dashboard for llm-logs. Point it at your DB; inspect your LLM usage.

Downloads

12

Readme

llm-logs-dashboard

A local, read-only web UI over your llm_logs table. Point it at your own Postgres database and get an inspectable console for LLM usage — requests, errors, latency, tokens, sessions, and agent runs — without shipping a single row to a third party.

The dashboard reads. It never writes. It has no accounts, no telemetry, and no daemon. You run it on your machine, it opens a browser tab, and it queries the same llm_logs table that the llm-logs library writes to.

Requires the llm-logs library to have created the table. The dashboard is a viewer — it does not create or migrate anything. Install llm-logs, wrap your LLM clients, and run npx llm-logs migrate (or let autoMigrate create the table on first write) before pointing the dashboard at your database.

Run it

npx llm-logs-dashboard

That's the whole setup. With no flags it resolves your connection string from DATABASE_URL (or LLM_LOGS_DATABASE_URL), reading a .env file in the current directory if present. It binds to 127.0.0.1:4242 and opens:

http://localhost:4242

On start it connects, reports how many log entries it found, and serves the UI:

Connected to PostgreSQL at db.internal:5432/app
Found 128,402 log entries
Dashboard running at http://127.0.0.1:4242
   Press Ctrl+C to stop

If the table can't be read, it tells you to run npx llm-logs migrate first.

Postgres is the only supported database today. (MySQL and SQLite are planned but not yet supported.)

CLI flags

| Flag | Default | Description | |---|---|---| | --db <url> | DATABASE_URL / LLM_LOGS_DATABASE_URL | Postgres connection string. | | --port <n> | 4242 | Port to listen on. | | --host <addr> | 127.0.0.1 | Host/interface to bind. |

npx llm-logs-dashboard --db "postgres://user:pass@host:5432/db" --port 8080 --host 127.0.0.1

The screens

  • Overview — the pulse: headline totals, request volume over time, and the outliers worth looking at.
  • Logs — a filterable, sortable table of individual calls, with a detail drawer for any row.
  • Errors — failures grouped and counted, so you can see what kind of thing is breaking and when it started.
  • Latency — how slow calls are, broken out so you can tell a shifting median from a fat tail.
  • Usage — traffic by provider and model: who serves the requests and which models dominate.
  • Sessions — multi-turn conversations rolled up by session, so you can see how deep they go.
  • Agent runs — agent executions rolled up by thread, with the parent/child structure of a run.
  • Prices — your own dated price sheet, used to overlay cost on top of tokens (see below).

The UI is read-only, requires no auth, and polls for fresh data rather than streaming.

Cost model

The dashboard is tokens-first. Tokens are the ground truth the provider returns and the only thing stored; the llm-logs library never computes or stores a cost figure.

Cost is a display-time overlay, derived from a price sheet that you own and edit:

  • The Prices screen is a user-owned, dated price sheet — per model, a set of non-overlapping, date-bounded rate intervals (input and output per-million rates). It ships with sensible defaults for known models and is fully editable.
  • Cost is derived per row at the moment you look at it: each call's timestamp selects exactly one rate, and rows with no covering rate render token-only rather than being guessed at.
  • Cost is never written back to the database. Change a rate and every number re-derives instantly. The price sheet lives entirely on the dashboard side, so the underlying table stays pristine and read-only.

This means you can adjust pricing retroactively, correct a rate you got wrong, or add a model that wasn't priced — without ever touching your data.

Reports

For a point-in-time snapshot you can pipe somewhere, use the report subcommand. It runs the same aggregate queries, prints to stdout (or a file), and exits.

npx llm-logs-dashboard report --range 30d --format md -o report.md

| Flag | Values | Default | Description | |---|---|---|---| | --range <r> | 24h 7d 30d 90d | 7d | Window to report over. | | --format <f> | md json csv | md | Output format. | | -o, --output <file> | path | stdout | Write to a file instead of printing. |

The report contains:

  • Totals — request count, total tokens, and error count with error rate.
  • Usage stats — mean and median tokens per request; mean, median, and p95 latency.
  • By provider — requests, tokens, and share of traffic per provider.
  • Top models — the models driving the most requests and tokens.
  • By client / by user — attribution splits (when that context is present in your logs).
  • Errors — failures grouped by type, with counts and first/last-seen dates.

The json format returns the full structured object; csv emits per-model rows (provider,model,requests,tokens).

The command is compute-only — it queries and exits. To deliver reports on a schedule, wire it into your own cron or CI (for example, a nightly job that runs the command and posts the Markdown to Slack). There is no built-in scheduler or delivery mechanism.

Non-goals

This is a deliberately small tool. It does not try to be an observability platform.

  • No auth. It's a local single-user viewer. If you expose it beyond localhost, put it behind your own reverse proxy / auth layer.
  • No writes. It only ever reads your llm_logs table. It does not migrate, backfill, or mutate anything.
  • Polls, not streams. Data refreshes by polling on an interval — there are no websockets and no live tail.
  • One database at a time. A single connection per process; no multi-DB fan-out or cross-database joins.

License

llm-logs-dashboard is distributed under a Fair Use License (not an OSI-approved open-source license — please read LICENSE before use). In short:

  • Free if any of these apply to you: you're an individual on personal/hobby projects; your organization's annual recurring revenue is under $1M; your organization has raised under $5M in total funding; or you're a student, academic, or non-profit.
  • $150/year, flat, per organization otherwise — no per-seat or per-request fees, one license covers the whole org. Enforcement is honour-based; the software has no telemetry or license-key server.
  • Converts to MIT three years after each version's publication date. Older versions are free forever.

See LICENSE for the full terms.

Commercial license: purchase at <add your Gumroad/Stripe link>.

The companion llm-logs library is Apache-2.0-licensed.