Tooling / CLI reference

Tooling

CLI reference

The `strata` CLI scaffolds projects, adds components, generates themes and diagnoses setup problems. Every command supports `--dry-run` and `--json`.

Updated Sep 29, 2026 5 min readCLI

Commands

CommandDescription
strata initDetect framework, write config and base layers
strata add <name…>Copy components into your project
strata diff [name]Show upstream changes to added components
strata theme --from <hex>Generate a palette from a brand colour
strata doctorCheck plugin order, globs and duplicates
strata upgrade --to <major>Run codemods between major versions

Adding components

strata add copies source files instead of installing a package, so you can edit them freely. Dependencies between components are resolved automatically.

npx @strata/cli add button dialog select
Output
✔ Resolved 3 components (+2 dependencies: popover, list-box)
✔ Wrote src/components/strata/button.tsx
✔ Wrote src/components/strata/dialog.tsx
✔ Wrote src/components/strata/select.tsx
✔ Installed @strata/react@3.6.8
Done in 1.8s

Global flags

FlagDefaultEffect
--cwd <path>process.cwd()Run as if started in <path>
--dry-runfalsePrint the plan, write nothing
--jsonfalseMachine-readable output for CI
--yes, -yfalseSkip confirmation prompts

Using in CI

.github/workflows/ui.yml
- name: Check Strata setup
  run: npx @strata/cli doctor --json > strata-report.json
- name: Fail on drift
  run: npx @strata/cli diff --exit-code

Was this page helpful?

Last edited Sep 29, 2026 · docs/cli.mdx