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

@subscriptonarc/cli

v1.2.0

Published

SubScript Protocol integration CLI — scaffold Arc USDC checkout, webhooks, and payment flows in seconds.

Downloads

492

Readme

@subscriptonarc/cli

The integration CLI for SubScript — programmable USDC payments on Arc. Scaffold a working checkout intent route, a signed webhook receiver, and a checkout button in seconds.

SubScript integrates over a plain REST API — there is no SDK to install. The generated server route and checkout button use the built-in fetch, so a standard hosted-checkout integration adds zero runtime dependencies to your project.

Quick start

# Interactive (humans at a terminal)
npx @subscriptonarc/cli

# Non-interactive (AI agents, CI, scripts) — no prompts, no dashboard round-trip
npx @subscriptonarc/cli init --key sk_test_... --merchant 0xYourWallet --framework next-app --yes

The wizard detects your framework (Next.js App/Pages Router, React SPA, Express), scaffolds the files you need, and writes a .env.local with your keys. Without a TTY the wizard never starts — you get the exact non-interactive command instead.

Commands

| Command | What it does | | --- | --- | | npx @subscriptonarc/cli | Interactive setup wizard (default). | | npx @subscriptonarc/cli init --key <sk_...> --merchant <0x...> --yes | Fully non-interactive setup. | | npx @subscriptonarc/cli init --offline --yes | Scaffold with placeholder env values — no key, no network. | | npx @subscriptonarc/cli init --session <token> | Non-interactive setup using a token from your merchant dashboard. | | npx @subscriptonarc/cli add checkout | Scaffold the checkout intent server route + button. Works in a fresh repo — no init or config file required. | | npx @subscriptonarc/cli add webhook | Scaffold the signed webhook receiver route. Also works without init. | | npx @subscriptonarc/cli doctor | Diagnose an existing integration (CLI-generated or hand-written). Exits 1 when issues are found. | | npx @subscriptonarc/cli verify | Verify generated files against the protocol templates. Exits 1 on FAIL. | | npx @subscriptonarc/cli update | Update generated files to the latest templates. | | npx @subscriptonarc/cli trigger <event> | Send a signed test webhook to your local endpoint. |

Options

| Flag | Description | | --- | --- | | -h, --help | Show help (exit 0). | | -v, --version | Show the CLI version. | | --json | Emit one machine-readable JSON object on stdout: { ok, command, files_written, error }. Progress logs go to stderr. | | --key <sk_...> | init: secret key (Dashboard → Developers → API keys). | | --merchant <0x...> | init: merchant payout wallet address. | | --framework <name> | init/add: next-app, next-pages, react-spa, or express (skips auto-detect). | | --mode <mode> | standard (default) or privacy-routed (ArcaneVM confidential settlement). | | --plan-name <name> | init: subscription plan name (default Premium Subscription). | | --amount <usdc> | init: plan amount cap in USDC (default 10). | | --interval <seconds> | init: plan interval in seconds (default 2592000 = 30 days). | | -y, --yes | init: accept defaults, never prompt. | | --offline | init: scaffold with placeholder env values; skips installs and all network calls. | | --no-components | init: backend routes only, no React components. | | --url <endpoint> | trigger: target webhook URL. | | --secret <whsec> | trigger: signing secret (defaults to SUBSCRIPT_WEBHOOK_SECRET / .env.local). | | --no-telemetry | Disable anonymous usage telemetry. |

Exit codes

0 on success, 1 on any failure. Errors print to stderr with the fix on the next line, so agents and CI can branch on the exit code and read the remedy without scraping stdout.

Machine-readable output

npx @subscriptonarc/cli init --offline --yes --json
{
  "ok": true,
  "command": "init",
  "files_written": [
    ".env.local",
    ".cursorrules",
    "components/subscript/SubScriptCheckoutButton.tsx",
    "app/api/subscript/checkout/route.ts",
    "app/api/webhooks/subscript/route.ts"
  ],
  "next_steps": ["..."]
}

How the integration works

  1. Your server route calls POST {SUBSCRIPT_BASE_URL}/api/intent with an Authorization: Bearer ${SUBSCRIPT_SECRET_KEY} header.
  2. Store the returned intentId next to your order/user and redirect the browser to checkoutUrl.
  3. SubScript settles the USDC payment on Arc and sends a signed webhook. The canonical event name is type: "payment.succeeded" (event: "payment.success" is a deprecated back-compat alias).
  4. Your webhook route verifies the signature against the raw body, enforces idempotency, and unlocks the entitlement.

License

MIT