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
| Command | Description |
|---|---|
| strata init | Detect 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 doctor | Check 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 selectOutput
✔ 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.8sGlobal flags
| Flag | Default | Effect |
|---|---|---|
| --cwd <path> | process.cwd() | Run as if started in <path> |
| --dry-run | false | Print the plan, write nothing |
| --json | false | Machine-readable output for CI |
| --yes, -y | false | Skip 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-codeWas this page helpful?
Last edited Sep 29, 2026 · docs/cli.mdx