Why schema-as-code?
Without the CLI, you register schemas by calling the API manually — once per environment, with no history. With the CLI, your schemas live as JSON files in your repository. They get reviewed in pull requests, deployed through CI/CD, and rolled back withgit revert.
Schema drift — where your code sends a field that no longer matches what Vela expects — becomes a build failure instead of a silent 400 at runtime.
How it works
1
Define schemas as JSON files
Create one
.json file per event type in vela/schemas/. Each file describes the event name, required fields, and validation rules.2
Preview changes with vela diff
Before pushing anything, see exactly what would change — new schemas, updated fields, removed fields — without touching the remote API.
3
Push to sync
vela push creates or updates schemas that have changed. Unchanged schemas are skipped.4
Pull to stay in sync
If schemas were modified in the dashboard or by another team member,
vela pull downloads them as local files so your repo stays current.CI/CD integration
Addvela diff as a check in your CI pipeline. It exits with code 1 when schemas are out of sync, failing the build before drift reaches production.
Quick links
Installation
Install the CLI globally or use it with npx.
Schema Format
JSON schema file structure and field types.
vela diff
Preview changes before pushing.
vela push
Sync local schemas to remote.