build
Read root plugin.json, validate it, and write a spec-conformant vendor manifest for each vendor declared in extensions["org.cyberuni.universal-plugin"].vendors.
universal-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 in extensions["org.cyberuni.universal-plugin"].vendors:
- Start with all canonical fields from root
plugin.json - Merge
extensions["org.cyberuni.universal-plugin"].harnesses.<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- root
plugin.jsondoes not exist at the plugin root --vendornames a vendor not inextensions["org.cyberuni.universal-plugin"].vendors
Unrecognized vendor keys in extensions["org.cyberuni.universal-plugin"].harnesses emit a warning and are skipped.
Examples
Section titled “Examples”# Build all declared vendorsuniversal-plugin build
# Build only Cursoruniversal-plugin build --vendor cursor
# Preview without writinguniversal-plugin build --dry-run --verbose
# Clean rebuilduniversal-plugin build --clean