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

stillrunning

v0.1.0

Published

One-line monitoring for any async job, agent, or script. Wrap a function and StillRunning gets a ping on success/failure with duration, and optional cost, tokens, and model.

Readme

stillrunning

Monitoring for any async job, agent, or script, in one line.

Wrap a function and StillRunning gets a ping on success or failure with the run's duration, plus optional cost, tokens, and model. Get alerted the moment a cron job stops, an agent fails, or a script runs too long or costs too much, with no ping plumbing.

For the Vercel AI SDK specifically, use stillrunning-vercel-ai-sdk (it auto-extracts tokens and cost). This package is the framework-agnostic option for everything else.

npm install stillrunning

30-second quickstart

  1. Create a workflow at stillrunning.ai/app/new and copy its token.

  2. STILLRUNNING_TOKEN=your_token_here

  3. Wrap your work:

    import { stillrunning } from 'stillrunning'
    
    const sr = stillrunning() // reads STILLRUNNING_TOKEN
    
    await sr.run(() => runNightlyImport())

run times the function, pings success when it resolves, pings fail with the error message if it throws (then rethrows untouched), and returns the function's result.

Attaching AI metrics

Pass meta, statically or derived from the result. If you give model plus token counts and no costUsd, cost is estimated from a built-in pricing table (Claude / GPT / Gemini):

const answer = await sr.run(() => callMyAgent(prompt), {
  meta: (result) => ({
    tokensIn: result.usage.inputTokens,
    tokensOut: result.usage.outputTokens,
    model: result.model,        // → costUsd estimated automatically
    toolCalls: result.steps.length,
  }),
})

Wrapping a function

wrap returns a monitored version with the same signature, handy for a function you call in many places:

const monitoredSync = sr.wrap(syncCustomerData)
await monitoredSync('acme')   // every call is monitored

Heartbeats and manual pings

For a cron job that just needs to say "I ran", or when you can't wrap the work in a single function:

await sr.heartbeat()                       // bare success ping
await sr.ping({ event: 'start', traceId }) // low-level escape hatch (success | fail | start | log)

Grouping multi-step runs with withTrace

By default each run is its own logical run. Group several under one trace so StillRunning stitches them into a single outcome chain:

import { stillrunning, withTrace } from 'stillrunning'
const sr = stillrunning()

await withTrace(async () => {
  await sr.run(() => stepOne())
  await sr.run(() => stepTwo())
}) // both pings share one traceId

Configuration

stillrunning({
  token,         // ping token; defaults to process.env.STILLRUNNING_TOKEN
  baseUrl,       // defaults to https://stillrunning.ai
  awaitPing,     // default true; false = fire-and-forget (lowest latency)
  pingTimeoutMs, // default 3000
  onError,       // (err) => void , observe ping delivery failures
  fetch,         // custom fetch (testing / non-global-fetch runtimes)
})

Monitoring never throws into your code: a ping that fails to send routes to onError and is otherwise swallowed. The ping is bounded by pingTimeoutMs, so a slow or down StillRunning never hangs your job.

Requirements

Node 18+ (or any runtime with fetch and AsyncLocalStorage).

License

MIT