Documentation Index
Fetch the complete documentation index at: https://docs.cubby.pro/llms.txt
Use this file to discover all available pages before exploring further.
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: thecubby 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:What happens after cubby init
cubby init writes the same template-aware brief into three files, one per agent:
| Agent | File it reads | Notes |
|---|---|---|
| Codex | AGENTS.md | See Using Cubby with Codex |
| Claude | CLAUDE.md | See Using Cubby with Claude (MCP optional) |
| Cursor | .cursor/rules/cubby.mdc | See Using Cubby with Cursor |
CUBBY.md is the deep-dive companion.
The canonical order (reference)
This is the order encoded in the generated files and the prompt above:Choose a template, then scaffold
cubby init <name> --template <choice>. Default is SQLite, not Postgres.Decide data scoping — default shared
One deployment = one shared dataset. The auth header is an access gate, not a
partition key.
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). Thex-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-idas awherefilter 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 dev— no Docker, no local test DB. On a SQLite app, Cubby runsprisma db pushfor you on deploy. If you want a live local DB to click through, thedata/dir must exist FIRST (mkdir -p data, thennpx prisma db push, which creates the SQLite file); without thedata/dirprisma db pushfails withP1003 Database does not exist. Never use a../DATABASE_URL. - Neon (
nextjs-neon):cubby dev— requires Docker running (it spins up a localpostgres:17-alpine). No Docker? PointDATABASE_URLat a real Neon branch in.env.localand runnpm run dev.
cubby dev for the full local-dev reference.