Skip to content

Repository files navigation

pickle-dev

Monorepo for @mcpick/create-pickle, a scaffolding CLI, and the project templates it scaffolds from. pnpm only.

Layout

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.

How templates are packaged

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.

How to add a template

  1. Add a directory under templates/<id>/ containing a real, buildable project.

  2. Register it in packages/create-pickle/src/templates.ts (templates array): an id, label, dir, frameworks, and its features (each with files, packageJsonKeys, and dependencies to prune when the feature is disabled).

  3. Use the two sentinel values instead of placeholder tokens, wherever the template needs the eventual project name or site URL:

    • pickle-app for the project/package name (e.g. wrangler.jsonc name).
    • https://pickle.example.com for the site URL (e.g. astro.config.mjs site).

    These are real, valid values — not {{TOKEN}}-style placeholders — because the template must build as-is. Astro validates site as a URL and wrangler validates name as a slug, so a template full of unresolved tokens couldn't build or be linted in CI. scaffold.ts rewrites 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).

  4. Add the template id to the scaffold job matrix in .github/workflows/ci.yml so CI scaffolds and builds a real project from it on every push.

Running the scaffold integration test locally

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.

Templates available today

Only the Astro template exists. A Hono template (phase 2) and a TanStack Start template (phase 3) are planned but not built yet.

CLI documentation

See packages/create-pickle/README.md for the full flag table and per-template docs.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages