build
Read .plugin/plugin.json, validate it, and write a spec-conformant vendor manifest for each vendor declared in vendorExtensions.
universal-plugin plugin build [options]Options
Section titled “Options”| Flag | Description |
|---|---|
--vendor <id> | Build only the named vendor |
--dry-run | Print what would be written without writing |
--verbose | Print field-by-field transformation decisions |
--clean | Delete generated manifests before building |
--root <path> | Plugin root directory (default: current directory) |
--format json | Output as JSON |
Vendor identifiers
Section titled “Vendor identifiers”--vendor | Output path |
|---|---|
claude-code | .claude-plugin/plugin.json |
cursor | .cursor-plugin/plugin.json |
codex | .codex-plugin/plugin.json |
copilot-cli | plugin.json (repo root) |
Build steps
Section titled “Build steps”For each vendor key in vendorExtensions:
- Start with all canonical open-plugin-spec fields from
.plugin/plugin.json - Merge
vendorExtensions.<vendor>fields (vendor fields win on conflict) - Drop component fields unsupported by the vendor (emits a warning)
- Translate hook event names to vendor casing
- Translate
${PLUGIN_ROOT}/${PLUGIN_DATA}env vars - Enforce required fields (fails build on missing)
- Write to the vendor output path
Validation
Section titled “Validation”The build fails (exit 1) if:
nameis missingversionordescriptionis missing when targetingcodex.plugin/plugin.jsondoes not exist at the plugin root--vendornames a vendor not invendorExtensions
Unrecognized vendor keys in vendorExtensions emit a warning and are skipped.
Examples
Section titled “Examples”# Build all declared vendorsuniversal-plugin plugin build
# Build only Cursoruniversal-plugin plugin build --vendor cursor
# Preview without writinguniversal-plugin plugin build --dry-run --verbose
# Clean rebuilduniversal-plugin plugin build --clean