Skip to main content

cubby init

Scaffold a new Cubby app with Next.js and Prisma preconfigured for the platform (SQLite by default; Neon Postgres on Builder/Pro).

Usage

Arguments

Examples

What Gets Created

The scaffold includes a complete Next.js 16 + Prisma setup (SQLite by default):

App Name Rules

App names must be DNS-safe:
  • 3-30 characters
  • Lowercase letters, numbers, and hyphens only
  • Must start and end with a letter or number
Names are automatically slugified:
  • My App becomes my-app
  • app_name becomes app-name

After Initialization

For the default SQLite template, npm run dev needs no Docker and no local database — Cubby runs prisma db push for you on deploy. Hot reload works immediately. If you chose the Neon Postgres template, use cubby dev instead — it runs a local Postgres container and requires Docker (see cubby dev).

The CUBBY.md File

Every scaffolded app includes a CUBBY.md file that provides context for AI coding assistants. It documents:
  • Platform constraints
  • API route patterns
  • Database access patterns
  • Authentication (handled by Cubby SSO)
  • What NOT to do
When using Claude or other AI tools, this file helps them understand Cubby’s conventions.

Customizing the Schema

Edit prisma/schema.prisma to define your data models:
You only need to push the schema locally if you want a live local database. On the SQLite template, the data/ dir must exist first, or prisma db push fails with P1003 Database does not exist:
On deploy, Cubby runs prisma db push for you — so for frontend work you can just run npm run dev. On the Neon template, cubby dev (Docker) handles schema sync automatically.

Next Steps

After cubby init:
  1. Install dependencies: npm install
  2. Start development: npm run dev (SQLite/no-DB; no Docker) or cubby dev (Neon; Docker)
  3. Edit your schema: prisma/schema.prisma
  4. Build your app: Add pages in app/
  5. Deploy: cubby deploy