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

@latten/cost

v0.1.2

Published

Cut LLM costs in your AI app and coding agents. On-device detection of wasted tokens (redundant calls, stuck loops, oversized + uncached context) with copy-paste fixes. Local-first, values-free.

Readme

@latten/cost — cut your LLM bill without slowing down

Spend big on AI. Just keep the bill in view.

Your token spend keeps climbing — more agents, bigger context, more calls — and it's hard to see where the money actually goes. @latten/cost finds the spend you can recover and shows you, on your machine, calmly. No dashboard to babysit, no data leaves your laptop, no throttling your AI. Keep the throttle where it is; we just point at the money sitting on the table.

npm install @latten/cost

See what you can recover (free, local, 30 seconds)

Point it at a coding-agent session and it tells you, in dollars, what's recoverable:

import {
  detectRedundantRoundTrips,
  detectStuckLoop,
  detectMissingEnvBootstrap,
  detectOversizedPriming,
  detectUncachedContext,
  flag,
  newFlagState,
} from '@latten/cost'

const suggestions = [
  ...detectRedundantRoundTrips(session),
  ...detectStuckLoop(session),
  ...detectMissingEnvBootstrap(session),
  ...detectOversizedPriming(session),
  ...detectUncachedContext(session),
]

flag(suggestions, newFlagState()).lines.forEach((l) => console.log(l.text))
// "Latten spotted about $0.42 you could recover across 6 turns (oversized context). Want the fix?"

That number is your activation moment. Most sessions have some — the question is how much, and whether you act on it.

How it reduces LLM costs

@latten/cost detects the common, expensive token-waste patterns on-device:

  • Redundant round-trips — the agent re-polls a tool whose result didn't change.
  • Stuck loops — repeated output that isn't making progress.
  • Oversized context — large prompts paying full price every turn instead of cached.
  • Uncached repeated context — the same big context re-sent, uncached.
  • Missing env bootstrap — early turns burned re-discovering the environment.

Each finding comes with a copy-paste fix and a fix tier (safe → control-flow), and a ledger that tracks the savings you've actually realized — never hypothetical waste. The "Saved with Latten" number is honest by construction.

It's local-first and values-free: it works on token counts, costs, and equality-only hashes — your prompts and code never leave the machine.

Reduce costs in your production app (paid)

Free keeps your coding-agent spend in view. When you want the same on every crossing in your production app — see and cut what your live LLM calls cost, across your whole team — that's the paid tier, part of Latten for Developers. Same engine, pointed at your app instead of your laptop.

| | Free | Solo $49/mo | Team $199/mo flat | |---|---|---|---| | Recoverable-spend detection in your coding agent | ✓ | ✓ | ✓ | | Cost visibility across your production app | | ✓ (1 app) | ✓ (up to 5 seats, multiple apps) | | Team-wide savings ledger | | | ✓ |

Pricing is flat and predictable — we never charge by the call, because metering your spend would mean charging you more to be more efficient. That's backwards.

Honest about what it is

Detection isn't magic: we catch the waste patterns we know, and we label fidelity honestly (measured vs estimated). The ledger only ever counts savings from fixes you applied. We'd rather under-claim and keep your trust than inflate a number.

Why local-first

Built by developers who went all-in on AI and wanted to keep the throttle without the bill-shock. Your spend data is yours; it stays on your machine unless you choose to share it. Same posture as @latten/redact, our sibling package that keeps secrets and PII out of your LLM calls.

Cut the bill, keep the speed. npm install @latten/cost.


You moved fast with AI. Latten helps you stay in control of it. See what your AI costs — and where your data goes: Latten turns the AI calls across your company into one live graph — cost, reach, and PII exposure, attributed and observed from real traffic. One prompt to your coding agent, a PR you review, live in minutes. latten.io