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

@utilities-studio/stripe-sync

v1.0.7

Published

Sync Stripe products, prices, and webhooks -- push config to Stripe, pull data to Supabase

Downloads

598

Readme

@utilities-studio/stripe-sync

Sync Stripe products, prices, and webhooks. Push config to Stripe, pull data to Supabase.

Usage

# Push products/prices from config to Stripe
bunx @utilities-studio/stripe-sync push ./scripts/stripe-config.json

# Dry run (show what would change)
bunx @utilities-studio/stripe-sync push ./scripts/stripe-config.json --dry

# Pull products/prices from Stripe to Supabase
bunx @utilities-studio/stripe-sync pull

# Force a pull target when auto-detection is not desired
bunx @utilities-studio/stripe-sync pull --target=stripe-sync-engine

# Setup/update webhook endpoint
bunx @utilities-studio/stripe-sync webhook ./scripts/stripe-config.json

Config Format

Create scripts/stripe-config.json in your project:

{
  "products": [
    {
      "name": "Free",
      "description": "Get started",
      "features": ["3 seats", "Basic support"],
      "metadata": { "seats": "3" },
      "prices": []
    },
    {
      "name": "Pro",
      "description": "Most popular",
      "features": ["Unlimited seats", "Priority support", "Analytics"],
      "metadata": { "seats": "-1", "analytics": "true" },
      "prices": [
        { "amount": 2900, "interval": "month", "lookupKey": "pro_monthly" },
        { "amount": 27800, "interval": "year", "lookupKey": "pro_yearly" }
      ]
    },
    {
      "name": "10 Credits",
      "description": "10 credits",
      "metadata": { "credits": "10" },
      "prices": [
        { "amount": 1000, "lookupKey": "credits_10", "oneTime": true }
      ]
    }
  ],
  "webhookName": "My App Webhooks",
  "webhookEvents": [
    "checkout.session.completed",
    "customer.subscription.created",
    "customer.subscription.updated",
    "customer.subscription.deleted",
    "invoice.paid",
    "invoice.payment_failed",
    "product.created",
    "product.updated",
    "price.created",
    "price.updated"
  ]
}

Environment Variables

| Variable | Required for | Description | |----------|-------------|-------------| | STRIPE_SECRET_KEY | all commands | Stripe API key | | SUPABASE_URL | pull, webhook | Supabase project URL | | SUPABASE_SERVICE_ROLE_KEY | pull | Supabase admin key | | SUPABASE_DB_URL | pull | Direct Postgres URL for the stripe-sync-engine target | | STRIPE_SYNC_TARGET | pull | Optional target: auto, public, or stripe-sync-engine |

Requirements

  • Bun runtime
  • Stripe account with API key
  • Supabase project (for pull and webhook commands)

Pull Targets

pull defaults to auto. It first uses legacy public tables (public.stripe_products and public.stripe_prices) when they exist. If those tables are not present, it falls back to Supabase's Stripe sync engine mirror tables (stripe.products and stripe.prices). For the sync engine target, the package uses SUPABASE_DB_URL when available so it can run sync-engine migrations and write through direct Postgres. Without SUPABASE_DB_URL, it falls back to Supabase REST, and the stripe schema must be exposed in Supabase API settings with writable grants for the service role.