Usage
Description
Build a registry from source files. This command validates theregistry.jsonc manifest, generates the index.json and component packument files, and copies raw component files into the output directory. Intended for registry authors who want to publish their own components.
Arguments
| Argument | Required | Description |
|---|---|---|
path | No | Registry source directory (default: current directory) |
Flags
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--out <dir> | ./dist | Output directory | |
--dry-run | false | Validate and show what would be built | |
--show-validation | false | Run full validation before build; show detailed validation output in human mode | |
--cwd <path> | Current directory | Working directory | |
--json | false | Output as JSON | |
--quiet | -q | false | Suppress output |
Examples
Build Registry in Current Directory
Build from a Specific Directory
Specify Output Directory
Validate Without Building
Show Validation Breakdown Before Build
--show-validation is set, OCX always runs validation checks before building.
- In human mode, it prints per-check validation results.
- With
--jsonor--quiet, validation still runs, but presentation follows those flags.
Output
Source Structure
The build command expects aregistry.jsonc file in the source directory:
Errors
| Error | Cause | Solution |
|---|---|---|
| Build errors | Invalid registry.jsonc or missing files | Check error messages for details |
See Also
- Creating Registries — Full guide for registry authors.
- Registry Protocol — Technical specification for registry HTTP APIs.
- CLI Reference — All commands.