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

@airewards/agent-sdk

v0.1.0

Published

AIRewards ad spinner for CLI AI agents: show a sponsored line while a Promise resolves.

Readme

@airewards/agent-sdk

Monetize the "thinking" state of your CLI AI agent. While your Promise (an LLM call, a build, anything async) resolves, the SDK renders a one-line sponsored spinner and credits your AIRewards developer wallet once the ad has been visible for 5 seconds.

Zero runtime dependencies — native fetch (Node 18+) and plain carriage-return terminal rendering.

Install

pnpm add @airewards/agent-sdk

Usage

Wrap any Promise-returning task with withAdSpinner. Your task's result (or rejection) passes through untouched, and nothing ad-related can delay or fail it.

import { withAdSpinner } from '@airewards/agent-sdk';

const completion = await withAdSpinner({
  apiKey: process.env.AIREWARDS_API_KEY!, // air_dev_… from the dashboard
  task: () => llm.complete(prompt),        // your real work
  spinnerText: 'Thinking…',                // shown until an ad arrives
});

While task runs the terminal shows:

⠹ [Sponsored] Ship faster with Acme Cloud — free tier for CLI agents

How it works

  1. The spinner starts immediately with your neutral spinnerText.
  2. GET /v1/ads/current?platform=cli is fetched concurrently with your task (never before it — a slow ad server cannot add latency to your CLI).
  3. When the ad arrives, the spinner text switches to [Sponsored] <ad text>.
  4. If the ad stays on screen for 5 seconds, the client begins a v2 challenge and sends visibility heartbeats while the ad remains visible. The server validates and risk-scores that evidence before recording provisional accounting; withdrawal eligibility follows the settlement delay.
  5. When your task settles, the spinner line is erased and the result returned.

Spinner rendering — and therefore impression reporting — is skipped when the output stream is not a TTY, so piped output stays clean and unseen ads are never credited.

Options

| Option | Type | Default | Notes | | ------------- | --------------------- | ---------------------- | --------------------------------------- | | apiKey | string | required | Developer API key, sent as Bearer token | | task | () => Promise<T> | required | The work to run | | baseUrl | string | production API | Point at a local backend for dev | | spinnerText | string | 'Thinking…' | Label before/without an ad | | stream | NodeJS.WriteStream | process.stdout | Where the spinner renders |

Demo

See apps/cli-demo for a runnable end-to-end example:

pnpm build
AIREWARDS_API_KEY=air_dev_… node apps/cli-demo/dist/index.js