Vega SDK — CLI Reference

CLI Reference

The vega-capability command installed by the SDK, its validate subcommand, and the Python entrypoint used to invoke it programmatically.

Installation

bash
python -m pip install vega-capability-sdk
vega-capability --help

vega-capability validate

bash
vega-capability validate [PATH] [--json]
TermMeaning
PATHCapability package directory. Optional; defaults to the current directory (.).
--jsonEmit the result as a JSON object.

Calls validate_capability_package and exits with status 0 for a valid package or 1 when validation raises CapabilityManifestError.

Successful output

text
valid: <capability_id> <version> (<action-count> actions)
json
{
"valid": true,
"capability_id": "...",
"version": "...",
"actions": ["..."],
"digest": "..."
}

Validation failure output

Without --json: invalid: <message>. With --json:

json
{
"valid": false,
"error": "...",
"details": {}
}

Python entrypoint

python
from vega_capability_sdk.cli import main
exit_code = main(["validate", ".", "--json"])
python
def main(argv: Sequence[str] | None = None) -> int: ...
TermMeaning
argvArgument sequence without the executable name. None reads process arguments.
Return0 for a valid package; 1 when validation raises CapabilityManifestError.

Argument parsing errors, missing subcommands, and --help are handled by argparse and can raise SystemExit. Exceptions other than CapabilityManifestErrorare not converted to exit code 1.