Documentation Index
Fetch the complete documentation index at: https://ocx.kdco.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Usage
ocx build [path] [options]
Description
Build a registry from source files. This command validates the registry.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
ocx build --show-validation
When --show-validation is set, OCX always runs validation checks before building.
- In human mode, it prints per-check validation results.
- With
--json or --quiet, validation still runs, but presentation follows those flags.
Output
$ ocx build
Building registry...
Built 5 components to dist
$ ocx build --json
{
"success": true,
"data": {
"components": 5,
"output": "/path/to/dist"
}
}
Source Structure
The build command expects a registry.jsonc file in the source directory:
my-registry/
registry.jsonc # Registry manifest
files/
agents/
my-agent.md # Agent definition
plugins/
my-plugin.ts # Plugin file
skills/
my-skill/
SKILL.md # Skill definition
Errors
| Error | Cause | Solution |
|---|
| Build errors | Invalid registry.jsonc or missing files | Check error messages for details |
See Also