create-patties Scaffolder
bunx create-patties my-app produces a new Patties project that runs immediately with bun dev. This is the developer's first impression of the framework; it m…
Purpose
bunx create-patties my-app produces a new Patties project that runs immediately with bun dev. This is the developer's first impression of the framework; it must be flawless.
Package
Lives in packages/create-patties/ (separate package from patties itself). Distributed on npm so bunx create-patties resolves it.
Usage
bunx create-patties <name> [--template <name>] [--target bun|edge]
[--deploy cloudflare|vercel|deno|netlify|bun|none]
[--agent claude-code|none]
[--no-install] [--no-git]
Interactive prompts
When run in a TTY without all flags supplied, prompt for the missing ones:
- Template —
default/with-islands/ai-starter. - Deploy target —
bun(self-hosted / long-running) /edge(portable Worker module). The framework picks no vendor at this step. - Deploy plugin (only when target=
edge) —cloudflare/vercel/deno/netlify/none(just emit the portable artifact). Installs the matching@patties/deploy-<choice>and adds it topatties.config.tsplugins. - AI coding agent —
claude-code/none.- Question text: "Will you use Claude Code on this project? We'll scaffold a CLAUDE.md and a .claude/ directory tuned for Patties."
- Default:
none(so the no-prompt path stays neutral and reproducible).
Non-TTY runs require flags; unanswered prompts fall back to defaults silently.
Behavior
- Validate
<name>as a legal directory and npm package name. - If the directory exists and is non-empty, refuse with a clear message.
- Copy the chosen template (
defaultif unspecified) into./<name>/. - Rewrite
package.json#nameto<name>. - Set the
targetinpatties.config.tsto the chosen value (defaultbun). - If
--agent claude-code: scaffold the Claude-Code-specific files per framework spec 15-claude-code-scaffold — namelyCLAUDE.mdat the project root and a.claude/directory withsettings.json,commands/, andagents/seeded for Patties. - If
--agent none: do not createCLAUDE.mdor.claude/. AGENTS.md is still auto-generated by the firstpatties build(framework 11) regardless of this choice. - Unless
--no-install, runbun installin the new directory. - Unless
--no-git, rungit init && git add -A && git commit -m "chore: initial commit from create-patties". - Print next-step instructions: ``
cd <name> bun dev`If--agent claude-codewas chosen, append:`Claude Code is configured. Open the project and runclaudeto start a session.``
Templates
default— one page, no islands, no agents. The Phase 0 success-signal app.with-islands— adds a counter island.ai-starter— adds one agent and one MCP tool (Phase 3+).
Templates live in packages/create-patties/templates/<name>/. Each is a real, runnable Patties project; CI builds and runs each one on every PR to catch drift.
Agent-tooling matrix
| Choice | AGENTS.md | CLAUDE.md | .claude/ |
|---|---|---|---|
--agent none (default) | generated on first patties build | — | — |
--agent claude-code | generated on first patties build | scaffolded immediately | scaffolded immediately |
AGENTS.md is the open, vendor-neutral context file — every project gets one. CLAUDE.md and .claude/ are Claude-Code-specific tooling and only ship when the developer opts in.
Acceptance criteria
bunx create-patties foo && cd foo && bun devends with a working page on localhost:3000.- Re-running
bunx create-patties fooin the same directory fails without overwriting anything. - The generated project's
AGENTS.md(after first build) lists exactly the seed route. bunx create-patties foo --agent claude-codeproducesfoo/CLAUDE.mdandfoo/.claude/matching framework spec 15.--agent noneproduces neither.- The interactive prompt for "AI coding agent" appears in a TTY when
--agentis not passed, and never blocks in a non-TTY.