create-marrow
v1.0.0
Published
Scaffold a TypeScript library, CLI, or workspace from the command line.
Maintainers
Readme
create-marrow
Scaffold a TypeScript library, CLI, or workspace from the command line.
Requires Node.js 22 or newer.
Usage
npm create marrow@latest my-libAnswer the prompts, or skip them with flags:
npm create marrow@latest my-lib -y --target node --vitest
npm create marrow@latest my-tool -y --target cli --manager pnpm
npm create marrow@latest my-mono -y --target workspace --viteWith -y, pass --manager (npm, pnpm, yarn, bun) unless you also pass
--no-install.
Targets
node: a library withmainpointing at./dist/index.cjs.browser: a library for browsers.isomorphic: a library for Node and browsers.cli: an executable package with abinentry instead of library entry points.workspace: a monorepo root (private,workspaces: ["packages/*"]) with a starter package insidepackages/.
The bundler defaults to tsdown (-b tsup selects tsup instead).
Flags
-t, --target <target>: one of node, browser, isomorphic, cli, workspace.-b, --bundler <bundler>: tsdown (default) or tsup.--vitest,--no-vitest: include or skip Vitest and its test file.--test-env <env>: node (default), jsdom, or happy-dom. Only applies to browser and isomorphic targets.--vite,--no-vite: add a Vite app at the root. Workspace target only.--size,--no-size: enforce a bundle size budget with size-limit. Library targets only.--biome,--no-biome: add Biome formatter and linter config.--git,--no-git: initialize a git repository.-m, --manager <manager>: package manager used to install dependencies.--no-install: skip installing dependencies.--offline: use pinned fallback versions instead of registry lookups. Also enabled withCREATE_MARROW_OFFLINE=1.--dry-run: print the resolved plan without writing files.-f, --force: overwrite a non-empty target directory.--license <license>: MIT, Apache-2.0, ISC, GPL-3.0, BSD-3-Clause, UNLICENSED, or Custom.--access <access>: public, private, or none.--publicis shorthand for public.--description <text>,--author <name>: written into package.json.-q, --quiet: suppress non-essential output for CI.--verbose: print stack traces for unexpected errors.--no-color: disable colors and animations.
Environment variables: CREATE_MARROW_OFFLINE=1 is equivalent to
--offline, and CREATE_MARROW_REGISTRY overrides the registry base
URL used for version lookups (default https://registry.npmjs.org).
What gets generated
A node library with --vitest produces:
my-lib/
package.json
tsdown.config.ts
tsconfig.json
vitest.config.ts
src/index.ts
test/index.test.ts
LICENSE
README.md
.gitignore
.nvmrcDependency versions resolve live from the npm registry by default, so a
fresh scaffold picks up the newest releases. --offline pins the
bundled fallback versions instead. Interrupting with Ctrl+C removes
temporary staging directories. Errors exit with code 1 and point at
--help and the issue tracker.
License
MIT
