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

@supacommerce/cli

v0.23.0

Published

CLI for supacommerce — initialise your ecommerce backend with one command

Downloads

1,757

Readme

@supacommerce/cli

The init command for supacommerce. Copies schemas, edge functions, and SQL files into your project.

Usage

npx @supacommerce/cli init

Options:

npx @supacommerce/cli init --dir ./my-project     # target a specific directory
npx @supacommerce/cli init --skip-confirmation    # skip the confirmation prompt

What it copies

your-project/
├── drizzle.config.example.ts
├── supabase/
│   ├── config.toml
│   ├── rls.sql
│   ├── functions.sql
│   ├── nuke-dbs.sql
│   ├── drop-dbs.sql
│   └── functions/
│       ├── deno.json
│       ├── _shared/
│       │   ├── cors.ts
│       │   └── supabaseAdmin.ts
│       ├── cart-checkout/index.ts
│       ├── order-confirmed/index.ts
│       ├── payment-webhook/index.ts
│       ├── admin-send-invite/index.ts
│       ├── admin-accept-invite/index.ts
│       ├── storage-upload/index.ts
│       └── storage-delete/index.ts
└── src/
    └── ecommerce/
        └── schema/
            ├── currencies.ts
            ├── regions.ts
            ├── customers.ts
            ├── catalog.ts
            ├── inventory.ts
            ├── pricing.ts
            ├── promotions.ts
            ├── tax.ts
            ├── fulfillment.ts
            ├── cart.ts
            ├── orders.ts
            ├── payments.ts
            ├── sales_channels.ts
            └── admin_users.ts

How it handles your project

  • Existing src/ directory — schemas are placed at src/ecommerce/schema/ without touching your existing code
  • Files that already exist — shown as overwrite in the preview table with a warning before writing
  • Non-existent target directory — prompts to create it
  • Missing template files — fails fast with a clear error before writing anything
  • Failed writes — reports which files failed; successfully written files remain
  • Package manager detection — automatically detects pnpm, yarn, bun, or npm and prints the correct install commands

After running init

1. Install dependencies

pnpm add drizzle-orm @supabase/supabase-js @supacommerce/client
pnpm add -D drizzle-kit

2. Configure Drizzle

mv drizzle.config.example.ts drizzle.config.ts

Add your database URL to .env:

DATABASE_URL=postgresql://postgres:[password]@[host]:5432/postgres

3. Start Supabase locally

supabase start

4. Generate and apply migrations

pnpm db:generate
supabase db push

5. Apply RLS policies and Postgres functions

Open the Supabase SQL Editor and run:

  1. supabase/rls.sql — Row Level Security policies
  2. supabase/functions.sql — Postgres RPC functions

These are not applied by supabase db push — they must be run manually each time you reset or re-provision.

6. Use the query client

import { createClient as createSupabaseClient } from "@supabase/supabase-js";
import { createClient } from "@supacommerce/client";

const supabase = createSupabaseClient(url, anonKey);
const commerce = createClient(supabase);

const products = await commerce.catalog.listProducts();
const cart = await commerce.cart.getOrCreate();

License

MIT