paykit
v0.1 beta

CLI

Project initialization and plan management from the command line.

PayKit includes a CLI tool for project setup, database migrations, and plan syncing. Install it once and use it throughout the project lifecycle.

paykitjs init

pnpm dlx paykitjs init
bunx paykitjs init
npx paykitjs init

An interactive setup wizard that scaffolds everything you need to get started. It asks you to pick a provider (Stripe, Polar, or Creem), then generates:

  • A paykit.ts config file with an example plan structure
  • A route handler for webhooks
  • An optional client file for frontend use

Run this once when starting a new project.

paykitjs push

pnpm dlx paykitjs push
bunx paykitjs push
npx paykitjs push

The command you'll run most often. It does two things:

  1. Applies any pending database migrations to keep your schema up to date
  2. Syncs your plan definitions to the database and your payment provider, creating or updating products and prices in Stripe (or whichever provider you're using)

Run it on initial setup and again whenever you change your plan configuration.

paykitjs check

pnpm dlx paykitjs check
bunx paykitjs check
npx paykitjs check

Validates your entire PayKit setup without making any changes. Useful in CI pipelines or when debugging a broken environment. It checks:

  • Configuration file validity
  • Database connection
  • Migration status (whether push needs to be run)
  • Provider API connectivity
  • Sync status between your config, database, and provider

Any failures are reported with a clear message and exit code, so it integrates cleanly with CI.

paykitjs telemetry

pnpm dlx paykitjs telemetry status
bunx paykitjs telemetry status
npx paykitjs telemetry status

Manages anonymous usage telemetry. PayKit collects no personally identifiable information. Subcommands:

  • enable - opt in to telemetry
  • disable - opt out
  • status - show the current setting

You can also disable telemetry permanently by setting the PAYKIT_TELEMETRY_DISABLED or DO_NOT_TRACK environment variables. Either one takes precedence over the local setting.