Getting Started

Install Create Preset and create a project.

Getting Started

The examples include configs, source files, and output for template variants, shared skills, and monorepo projects.

If a template author already provides a creation command, run it directly. There is no need to write a JSON config first.

Run Create Preset with a package manager:

Bash
pnpm create preset

Then enter a project name and choose a stack and template.

Configured private presets appear before official generators within each stack. For official generators, follow that CLI's prompts.

Requirements

  • Install Node.js 14 or later to run the npm launcher. The package includes a precompiled Rust CLI, so no Rust compiler is required. Check the framework's documentation for the Node.js version required by its generator.
  • Official generators need an available package manager: npm, Yarn, pnpm, or Bun.
  • Creating projects from Git repositories requires Git and access to the source repository.

Global installation

For frequent use, install globally:

Bash
pnpm add -g create-preset

Check the version with preset -v. The examples below use the global preset command. The Yarn global installation command applies to Yarn Classic.

Update a global installation with preset upgrade, then run preset -v again to check the version.

Direct creation

Use --from to select a source directly. For example, run the official Vue generator with pnpm:

Bash
preset init my-vue-app --from vue --package-manager pnpm

The Vue generator handles the remaining setup and installation prompts.

List the available official generator IDs and configured private presets with:

Bash
preset --list

Use an ID from this list with --from. Unknown sources exit with an error.

--from also accepts a configured private preset name, a local JSON file path, or a remote config URL:

Bash
preset init my-docs --from https://example.com/preset.json

Replace the example URL with an actual config URL. Create Preset downloads the template and applies the configured file and dependency changes. See Preset configs for the format.

Preview creation

Add --dry-run to preview the JSON creation plan:

Bash
preset init my-vue-app --from vue --package-manager pnpm --dry-run
preset init my-docs --from ./preset.json --dry-run

The preview shows the target and source without cloning repositories, running generators, querying npm versions, or changing project files. Remote config URLs are still fetched and validated.

When replacing files in an existing target directory, the CLI asks for confirmation. Add --yes to allow replacement in a script:

Bash
preset init my-docs --from ./preset.json --yes

--yes skips only Create Preset's replacement confirmation. Official generators keep their own prompts.

Change the language

Create Preset follows the system language and supports English, Simplified Chinese, Traditional Chinese, and Japanese. Set PRESET_LANG to choose a language explicitly. For example, switch to Japanese in a macOS or Linux terminal:

Bash
PRESET_LANG=ja-JP preset init

Official generators determine their own prompt language.