Monorepo for @stacknide/create-package — a CLI that scaffolds a
production-ready TypeScript npm package — and the template it
generates from.
npm create @stacknide/package my-package
# or
npx @stacknide/create-package my-package| Path | What it is |
|---|---|
template/ |
The tokenized payload copied into new projects (single source of truth). |
cli/ |
The @stacknide/create-package scaffolder that bundles template/. |
The CLI never edits template/ directly at publish time — a build step
(cli/scripts/sync-template.mjs) copies
template/ into cli/template/ so it ships inside the published tarball.
- tsup — ESM + CJS +
.d.tsbundling. - Biome — lint + format.
- Changesets — versioning & changelogs.
- Lefthook — pre-commit / pre-push git hooks.
- Yarn 4 workspaces — a
package/(published) +test/(runtime tests) split. - GitHub Actions — PR checks + Release workflow with OIDC trusted publishing.
Files under template/ use {{token}} placeholders that the CLI substitutes:
| Token | Example |
|---|---|
{{packageName}} |
@stacknide/my-lib |
{{packageSlug}} |
my-lib |
{{packageDescription}} |
A tiny, well-typed utility. |
{{author}} |
Jane Doe <https://github.com/jane> |
{{githubOrg}} |
stacknide |
{{githubRepo}} |
stacknide/my-lib |
{{year}} |
2026 |
{{licenseHolder}} |
Stacknide |
.gitignore/.npmignoreare stored un-dotted (gitignore,npmignore) insidetemplate/because npm strips dotfiles from published tarballs; the CLI restores their names when scaffolding.
yarn install
yarn dev # run the CLI from source (tsx)
yarn build # bundle the CLI (syncs template/ first)
yarn test # build + scaffold smoke testyarn bump # add a changesetMerging to main runs the Release workflow,
which opens a Version Packages PR; merging that publishes @stacknide/create-package
to npm via OIDC (configure the trusted publisher on npmjs.com first).