Skip to main content

Workspace Config

event-spec.yaml is the root configuration file for your project. The CLI looks for it in the current directory by default.

Full reference

event-spec.yaml
version: 1 # config schema version, always 1
workspace: "my-company" # logical workspace name, used in generated package names

registry:
mode: local # local | git | server
# git mode only:
# url: https://github.com/my-org/analytics-specs.git
# ref: main
# server mode only:
# url: https://registry.example.com
# api_key: ${REGISTRY_API_KEY}

specs_dir: ./specs # directory tree of event spec YAML files
sources_dir: ./sources # directory of source definition YAML files
destinations_dir: ./destinations # directory of destination definition YAML files

# audit:
# path: ./src # directory to scan with event-spec audit (default: .)
# coverage_min: 80 # minimum coverage % — 0 disables the check
# report: text # report format: text | json | html

Fields

FieldTypeDefaultDescription
versionintegerConfig schema version. Must be 1.
workspacestringLogical workspace name, used in generated package/module names.
registry.modestringlocalRegistry backend: local, git, or server.
registry.urlstringGit repo URL (git mode) or server base URL (server mode).
registry.refstringmainGit branch, tag, or commit (git mode only).
registry.cache_dirstring~/.event-spec/cache/<hash>Local clone path for git mode.
registry.api_keystringAPI key for server mode. Supports ${ENV_VAR} expansion.
specs_dirstring./specsPath to the event spec YAML directory tree.
sources_dirstring./sourcesPath to the source definition directory.
destinations_dirstring./destinationsPath to the destination definition directory.
audit.pathstring.Default scan path for event-spec audit.
audit.coverage_minnumber0Minimum coverage percentage (0 = disabled).
audit.reportstringtextDefault audit report format: text, json, or html.

Registry modes

ModeWhen to use
localSpecs live in this repo (monorepo or small team). No network required. Supports fsnotify hot-reload.
gitSpecs live in a separate git repository. Use event-spec pull to sync the cache locally.
serverSpecs are managed by a running registry server. Use event-spec serve to start one.

See Registry — Local, Registry — Git, and Registry — Server for setup details.

CLI fallback

If event-spec.yaml is absent the CLI falls back to:

  • specs_dir: ./specs
  • sources_dir: ./sources
  • destinations_dir: ./destinations
  • Registry mode: local

This means simple projects with the conventional layout can skip the config file entirely.