Skip to content

CLI Presets

Mel edited this page Nov 10, 2026 · 1 revision

A preset is a named import plan: a list of entries, with an optional destination for each row. Plans live in presets/<name>.toml. Applying one imports every row at once, through the same plan that import uses, so requires are followed and refusals happen before anything is written.

A preset is different from a template: a template is an entry whose file payload is copied into the project. Presets group imports; templates carry files.

stack preset list
stack preset show react-app
stack preset apply react-app --dry-run
stack preset apply react-app --project ./my-app
$ stack preset list
- react-app (3 imports): Starter set for a React 19 + Vite + Tailwind 4 app: strict TS/ESLint/Prettier/Vitest/Playwright configs at the project root, the pinned Tailwind notes, and a button component under src/components.
$ stack preset apply react-app --dry-run --project ./rapp
preset  react-app (3 imports)
import  templates/react-vite-tooling -> .
import  libraries/tailwindcss -> .stack/libraries/tailwindcss
import  components/base/button -> src/components/button
ignore  would update .gitignore (managed escacs block)
agents  would update AGENTS.md (managed escacs block)
dry run: nothing written

A preset file is short. This is presets/react-app.toml, abridged:

[preset]
name = "react-app"
description = "Starter set for a React 19 + Vite + Tailwind 4 app: ..."

[[import]]
id = "templates/react-vite-tooling"

[[import]]
id = "libraries/tailwindcss"

[[import]]
id = "components/base/button"
to = "src/components/button"
  • preset list and preset show accept --json. preset show in plain text prints the description and the rows.
  • preset apply accepts --project, --ref, --dry-run and --offline.
  • The first line of a preset apply names the plan and its row count. The rest is the import plan.
  • A broken preset file fails the whole preset list read. Preset names must be kebab-case.

See also: CLI Importing, CLI Recipes, CLI Discover.

Clone this wiki locally