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

@promptai.credit/cli

v0.2.0

Published

Earn ad-subsidized prompt credits from terminal AI agents (Claude Code). Watch a dev-tool ad while your agent works; verified watches pay your prompt's token cost in USDC.

Readme

promptai CLI

Brings the earn loop (prompt → opt-in ad during the wait → server-side verification → credit → USDC claim) to agents beyond the classic Cursor IDE. Claude Code and the Cursor Agents Window are supported today; Codex CLI is next.

How it works

  1. promptai install claude merges two hooks into ~/.claude/settings.json:
    • UserPromptSubmit: baselines the session's transcript watermark and (if opted in, at most every 90s, never headless) opens the hosted rewarded-ad page (/watch) in your browser. The ad plays while your agent works.
    • Stop (async): reads the session transcript JSONL since the watermark, prices the turn with the shared model price table, and redeems one banked server-verified ad session against it via the API.
  2. The /watch page creates the ad session server-side on load, so SSV wall-clock timing is enforced by the server; the browser countdown is cosmetic.
  3. promptai claim pays out your verified balance as USDC on Base.

Cursor Agents Window (Glass)

The Agents Window doesn't run VS Code extensions, so the promptai extension can't cover it. promptai install cursor wires beforeSubmitPrompt + stop into ~/.cursor/hooks.json (core Cursor hooks fire in both the Agents Window and the classic IDE):

  • Hook payloads are routed by shape (cursor_version/conversation_id), so events reach the right adapter even if Cursor loads our Claude-format hooks through its third-party mapping.
  • Cursor 3.7+ reports real token usage on the stop payload (input_tokens, output_tokens, cache splits); cost is priced from that, with cached reads/writes discounted. On older versions the cost falls back to a transcript character-volume estimate (Glass transcripts carry no token counts and redact assistant prose).
  • When the classic IDE's extension host is running it already credits prompts, so the CLI detects its listener file (live pid) and stands down - no double credit.
  • Duplicate stop events for the same generation are collapsed with an atomic once-lock in ~/.promptai/locks/.
  • On remote/SSH workspaces (CURSOR_CODE_REMOTE), the remote host has no display: no ad tabs open there. Bank credits with promptai watch from any browser (/watch?device=<your device id>) instead.

State lives in ~/.promptai/ (config.json, state.json, cli.log).

Setup

npm install -g @promptai.credit/cli
promptai install claude      # Claude Code hooks
promptai install cursor      # Cursor Agents Window / classic IDE hooks

# then:
promptai status              # device, balance, banked ad watches, recent prompts
promptai watch               # open a rewarded ad now (banks a credit for later)
promptai set wallet 0x...    # payout address
promptai claim               # USDC on Base
promptai set ads off         # opt out any time

The default server is https://api.promptai.credit; point elsewhere with promptai set server <url>.

Developing from the repo instead: pnpm --filter @promptai.credit/cli build, then node product/cli/dist/index.js install claude (hooks embed the absolute path).

Notes

  • Credits only accrue for turns funded by a verified ad watch, enforced server-side (same rules as the Cursor extension: one session funds one prompt, capped at $5).
  • Headless environments (CI, ssh without a display) never get browser tabs and simply skip crediting.
  • Uninstall with promptai uninstall claude; other hooks in your settings are preserved.