Monorepo for @mcpick/create-pickle, a scaffolding CLI, and the project templates it
scaffolds from. pnpm only.
packages/create-pickle/ the CLI (published package)
templates/ real, runnable project templates (not a pnpm workspace)
templates/ is deliberately not a pnpm workspace member (see pnpm-workspace.yaml,
which lists only packages/*). Templates are standalone projects so CI can install
and build them for real, catching template rot the same way a user would hit it.
If you need to work on a template locally:
cd templates/astro
pnpm install --ignore-workspace
A bare pnpm install from inside templates/astro silently no-ops (pnpm treats it as
part of the outer workspace even though it isn't registered as a member) — always pass
--ignore-workspace there.
Root/CLI code pins typescript@7.0.2. templates/astro pins typescript@^5.9.3
alongside @astrojs/check (which peers on typescript ^5 || ^6). Two majors coexist
deliberately — safe because templates/ installs standalone, not as a workspace member.
The CLI's build (packages/create-pickle/tsdown.config.ts) copies templates/ into
packages/create-pickle/dist/templates after compiling, excluding node_modules,
dist, .astro, and .wrangler. The CLI resolves templates from that copied
directory at runtime — it does not read from templates/ in the source tree.
-
Add a directory under
templates/<id>/containing a real, buildable project. -
Register it in
packages/create-pickle/src/templates.ts(templatesarray): anid,label,dir,frameworks, and itsfeatures(each withfiles,packageJsonKeys, anddependenciesto prune when the feature is disabled). -
Use the two sentinel values instead of placeholder tokens, wherever the template needs the eventual project name or site URL:
pickle-appfor the project/package name (e.g.wrangler.jsoncname).https://pickle.example.comfor the site URL (e.g.astro.config.mjssite).
These are real, valid values — not
{{TOKEN}}-style placeholders — because the template must build as-is. Astro validatessiteas a URL and wrangler validatesnameas a slug, so a template full of unresolved tokens couldn't build or be linted in CI.scaffold.tsrewrites both sentinels to the user's real name/URL at scaffold time (URL replaced before name, in case a future sentinel value ever nests inside another). -
Add the template id to the
scaffoldjob matrix in.github/workflows/ci.ymlso CI scaffolds and builds a real project from it on every push.
This mirrors the scaffold job in .github/workflows/ci.yml:
pnpm build
cd /tmp
node /path/to/pickle-dev/packages/create-pickle/dist/index.js scaffolded-app \
--template astro --yes --no-install
cd /tmp/scaffolded-app
pnpm install --no-frozen-lockfile
pnpm check
pnpm build
Run this from outside the repo/workspace (CI uses ${{ runner.temp }}), passing the CLI an
absolute path and a bare project name — scaffolding inside the pnpm workspace root makes
pnpm install silently no-op, same as the templates/astro caveat above.
Only the Astro template exists. A Hono template (phase 2) and a TanStack Start template (phase 3) are planned but not built yet.
See packages/create-pickle/README.md for the full flag table and per-template docs.