Skip to main content

Expert from paste

Copy one prompt into your coding agent and it becomes an effective Cubby developer immediately: it installs the CLI, logs in, scaffolds with the right template, makes the correct local-dev call, defaults to the correct data model, and deploys — without the trial-and-error of guessing Cubby’s conventions. This page is agent-neutral. Codex, Claude, and Cursor all work the same way: the cubby init scaffold writes the agent-rules files each tool already reads (AGENTS.md for Codex, CLAUDE.md for Claude, .cursor/rules/cubby.mdc for Cursor), so the deep, template-correct contract lands in your project automatically. MCP is an optional Claude add-on — see Using Cubby with Claude — not a requirement for any of the three.
Why a thin prompt, not a giant one. The paste prompt’s job is not to teach your agent everything — a static block can’t stay correct per template and will drift. Its job is to get the agent to run cubby init, then read the generated CUBBY.md / AGENTS.md / CLAUDE.md, which are template-aware and authoritative. Those generated files override this website where they disagree.

The paste prompt

Paste this into Codex, Claude Code, or Cursor at the start of a Cubby project:
Replace <my-email> with the email on your Cubby account before pasting, or your agent will ask for it on step 2.

What happens after cubby init

cubby init writes the same template-aware brief into three files, one per agent: All three contain the same canonical order as the prompt above, plus the template-specific detail (Docker vs no-Docker, SQLite vs Postgres, the data-scoping worked example). Because they are generated per template, they are correct for your app in a way a static prompt cannot be. The richer CUBBY.md is the deep-dive companion.

The canonical order (reference)

This is the order encoded in the generated files and the prompt above:
1

Install

npm install -g cubbypro
2

Log in

cubby login <email> then cubby whoami to confirm.
3

Choose a template, then scaffold

cubby init <name> --template <choice>. Default is SQLite, not Postgres.
4

Read the generated files

CUBBY.md / AGENTS.md / CLAUDE.md — they override this site.
5

Decide data scoping — default shared

One deployment = one shared dataset. The auth header is an access gate, not a partition key.
6

Ask about local dev (Docker)

SQLite / no-DB → npm run dev (no Docker). Neon → cubby dev (Docker).
7

Validate

cubby check — run once, fix what it flags.
8

Deploy

cubby deploy — async, ~3–5 min.
9

Secrets after first deploy

cubby secrets set <NAME> --env prod, then redeploy / cubby secrets apply --env prod.

Data scoping — default to shared

The single most common mistake: keying every row by the signed-in user. Cubby’s gateway already controls who can open the app (owner + explicitly-shared users). The x-cubby-user-id header answers “is this person allowed in?” — never “whose row is this?”
  • Default to SHARED. One deployment = one shared dataset. Proceed shared unless you explicitly declare the app per-user.
  • Auth gate ≠ partition key. Do not use x-cubby-user-id as a where filter unless the app is genuinely per-user.
  • localStorage → DB is the trap moment. Porting a single-browser prototype tempts “one row per user” — re-examine scope right then.
  • A family / team / household seed is a tell the data is shared. Want a separate group? Deploy a separate copy.

Local dev — ask first

Always ask the user “do you have Docker, or is frontend-only local dev fine?” before running anything locally — don’t guess.
  • SQLite (nextjs-sqlite) or no-DB (nextjs): npm run devno Docker, no local test DB. On a SQLite app, Cubby runs prisma db push for you on deploy. If you want a live local DB to click through, the data/ dir must exist FIRST (mkdir -p data, then npx prisma db push, which creates the SQLite file); without the data/ dir prisma db push fails with P1003 Database does not exist. Never use a ../ DATABASE_URL.
  • Neon (nextjs-neon): cubby devrequires Docker running (it spins up a local postgres:17-alpine). No Docker? Point DATABASE_URL at a real Neon branch in .env.local and run npm run dev.
See cubby dev for the full local-dev reference.