CLI scaffolding tool for setting up PulseKit analytics in a Next.js project.
Run in the root of an existing Next.js project:
npx create-pulsekit- Detects your package manager (npm, yarn, pnpm, bun)
- Validates that you're in a Next.js project
- Installs
@pulsekit/core,@pulsekit/next, and@pulsekit/react - Scaffolds the analytics dashboard page and API routes
- Scaffolds a
vercel.jsonwith cron jobs for automatic data aggregation and cleanup - Injects the
<PulseTracker />component into your root layout - Injects the error instrumentation for server-side error tracking
- Writes the Supabase SQL migration file
- Add your environment variables to
.env.local:NEXT_PUBLIC_SUPABASE_URL=<your-supabase-url> NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=<your-anon-key> SUPABASE_SERVICE_ROLE_KEY=<your-service-role-key> PULSE_SECRET=<a-secret-at-least-16-characters> CRON_SECRET=<a-random-string-for-cron-auth> - Link and push the database migration:
npx supabase link npx supabase db push
- If deploying to Vercel, add
CRON_SECRETto your project environment variables to enable automatic data aggregation and cleanup - Start your dev server and visit
/admin/analytics
MIT