Quickstart
The fastest path from a fresh create-next-app (or Vite app) to a real paywall, a Stripe test purchase, and a number moving in your analytics funnel — no support needed.
0. Two steps: you sign up, your coding agent does the rest
Step 1 is yours: npx vibemonetize signup --email you@example.com mints test keys and emails you a 6-digit code — the one thing an agent can't do for you against the hosted API. Step 2 is your coding assistant's: tell it "integrate VibeMonetize" and paste the prompt below, which covers the rest of this page (steps 1–5) with a machine-checkable definition of done:
No deliverable inbox (local eval, self-hosting, a CI box, an autonomous agent)? Running the API without RESEND_API_KEY configured and outside a production build (i.e. local dev, or a self-hosted deploy with NODE_ENV unset/non-production) makes signup/start print the code to the API server's console and echo it back as adevCode field in the response — npx vibemonetize signup --email … prints it directly when this applies, so the whole loop runs with zero human involvement. This field is never present against the hosted production API.
Local/self-host note: the platform's own Free-tier app cap (3 apps) and dashboard /pricing self-serve upgrade only work once you've run pnpm --filter @vibemonetize/api seed:platform (see apps/api/scripts/seedPlatform.ts) against your local/self-hosted database — an unseeded platform tenant means no cap is enforced and /pricing has nothing to show.
Monetize this app with VibeMonetize. Run `npx vibemonetize init`, then follow the
MONETIZE.md it writes. Sign me up with `npx vibemonetize signup --email <my email>`
(I'll give you the 6-digit code from my inbox), provision a plan with
`npx vibemonetize app create` (use --template saas if I haven't told you prices),
gate my main paid feature client-side AND server-side, and don't tell me it's done
until `npx vibemonetize doctor` exits 0.1. Run the CLI
Paste this into your own Claude Code / Cursor / Codex session, or run it yourself:
npx vibemonetize initThe CLI:
- detects whether you're in a Next.js (App Router) or Vite project,
- installs and wires up
@vibemonetize/react(adds<MonetizeProvider>to your root layout/entrypoint), - writes the required
NEXT_PUBLIC_VIBEMONETIZE_*/VITE_VIBEMONETIZE_*env vars to.env.local(never commits real keys), - adds
@vibemonetize/seoand drops a<SeoPage>starter, plusapp/sitemap.ts/app/robots.ts(Next.js, via@vibemonetize/seo/next) or staticpublic/sitemap.xml/public/robots.txt(Vite) — write-once, so it never overwrites files you've already edited, - writes a
MONETIZE.mdinto your repo explaining exactly what changed and why — legible to an LLM picking the project back up later, not just a human.
Test & live modes
Every publishable/secret key comes in a live (pk_live_/sk_live_) and a test (pk_test_/sk_test_) pair — vibemonetize signup mints and writes the test pair only, into *_TEST_PUBLISHABLE_KEY (client) and VIBEMONETIZE_TEST_SECRET_KEY (server). Use test keys for local dev and staging; keep live keys for production only.
- Client side just works right after signup: the generated
<MonetizeProvider>wiring prefers the live publishable-key var, falling back to the test one, so the paywall renders in test mode with no extra config. - Server side also just works right after signup:
@vibemonetize/server'screateClient()readsVIBEMONETIZE_SECRET_KEY, falling back toVIBEMONETIZE_TEST_SECRET_KEYwhen the live var is unset (an explicitcreateClient({ secretKey })option still wins over either). Still, once you know which key a given environment should use, setVIBEMONETIZE_SECRET_KEYexplicitly there (test locally/in staging, live in production) — relying on the fallback past that point just lets a forgotten live var fail silently instead of loudly. - Going live: mint a live pair from the dashboard, or
POST /v1/api-keysauthenticated with the test secret key you already have, once you're ready to take real payments — then set the live values into that environment's plainVIBEMONETIZE_SECRET_KEY/*_VIBEMONETIZE_PUBLISHABLE_KEYvars. Full env-var table and the local/staging/production recipe: root llms.txt.
2. Create a plan in the dashboard
Open your developer dashboard, connect Stripe (deferred — you can ship a paywall before finishing Connect onboarding), and create a plan: a price, an interval, and which features/meters it grants.
Running this docs site locally, or self-hosting the dashboard elsewhere? That link points at the hosted dashboard by default — set NEXT_PUBLIC_DASHBOARD_URL (see the docs app's README.md) to point it at your own dashboard instead.
Prefer the terminal? npx vibemonetize app create --template saas provisions a recommended Free + Pro pack in one command (ai-credits and daily-free templates cover credit packs and daily allowances) — you can tune prices in the dashboard later. It also prints a hosted sell link where your plans are buyable immediately, before you've built any UI.
3. Add one paywall
import { Paywall, CheckoutButton } from "@vibemonetize/react";
<Paywall feature="export" fallback={<CheckoutButton planSlug="pro">Upgrade to export</CheckoutButton>}>
<ExportButton />
</Paywall>See the paywall guide for the server-side enforcement half — the client gate above is UI-only.
4. Verify, then complete a Stripe test purchase
npx vibemonetize doctordoctor checks the whole wiring — keys, provider, plans, server-side enforcement, and how far your funnel has fired — and prints the exact fix for anything broken (the client paywall fails open by design, so "it renders" proves nothing; doctor exiting 0 does). For a 10-second unlock check without checkout, npx vibemonetize grant --email you@example.com --plan pro comps you the plan in test mode.
Then prove checkout end to end: click through <CheckoutButton> with Stripe test card 4242 4242 4242 4242. The webhook lands, your entitlement token refreshes, and the paywall opens — no redeploy.
5. Watch the funnel
Your dashboard's analytics tab already has this: visitors → signups → activation → paywall impression → checkout started → converted. That's the whole loop.
Next steps
- Guides — credits, meters, checkout, entitlement tokens.
- Reference — the full public API of every package.
- Pricing philosophy — how to think about pricing a vibe-coded app.