CLI
Run registry-build from config roots, CI, or local package scripts.
The CLI is the normal runtime entrypoint. Consumers should call registry-build build from the package or app that owns the config and the generated outputs.
Main command
registry-build buildregistry-build buildThe CLI discovers registry-build.config.* starting from the current working directory unless you provide --config or --cwd.
Build flags
| Flag | Purpose |
|---|---|
-c, --config <path> | Use a specific config file |
--cwd <path> | Change config discovery root |
--silent | Hide banner and summary output |
--json | Emit machine-readable build summary |
--verbose | Print full error stack |
--changed-only | Reuse cached work aggressively |
--changed <paths...> | Narrow rebuild work to affected paths |
Common examples
Default build
registry-build buildregistry-build buildUse a specific config file
registry-build build --config ./configs/registry-build.config.tsregistry-build build --config ./configs/registry-build.config.tsRun from CI with JSON output
registry-build build --json --silentregistry-build build --json --silentWarm local rebuild for changed files only
registry-build build --changed-only --changed ../../packages/registry-ui/src/button/button.tsxregistry-build build --changed-only --changed ../../packages/registry-ui/src/button/button.tsxPackage script patterns
Minimal:
{
"scripts": {
"build:reg": "registry-build build"
}
}{
"scripts": {
"build:reg": "registry-build build"
}
}Split raw build and formatting:
{
"scripts": {
"build:reg": "bun run build:reg:cli && bun run format:reg",
"build:reg:cli": "registry-build build",
"format:reg": "bunx biome format --write ./__ui_registry__/index.tsx"
}
}{
"scripts": {
"build:reg": "bun run build:reg:cli && bun run format:reg",
"build:reg:cli": "registry-build build",
"format:reg": "bunx biome format --write ./__ui_registry__/index.tsx"
}
}That pattern keeps build:reg as the default one-command workflow while still leaving build:reg:cli available for direct flag usage.
Exit behavior
- validation or load errors fail the command with a non-zero exit code
--verboseincludes the full stack for debugging--jsonis useful for CI, custom dashboards, or local tooling wrappers
Config discovery rules
The loader searches for these filenames:
registry-build.config.tsregistry-build.config.mtsregistry-build.config.ctsregistry-build.config.jsregistry-build.config.mjsregistry-build.config.cjsregistry-build.config.json
Config-relative paths are normalized as soon as the config is loaded. That prevents the usual confusion between current working directory and config file location.