osl CLI
The osl binary drives the authoring loop for developers and CI.
Commands
Section titled “Commands”| Command | Purpose |
|---|---|
osl validate <project_dir> |
JSON Schema + cross-references + dbt model existence |
osl compile <project_dir> [--output target/] |
Emit the canonical manifest.json |
osl plan <project_dir> <query> |
Dry-run a query — inspect SQL/retrieval plan + policy check |
osl publish <project_dir> --to <engine> |
Upload the manifest (atomic; --revert) |
osl migrate from-metricflow <src> <dst> |
Generate an OSL project from a MetricFlow project |
osl export to-metricflow <src> <dst> |
Export an OSL project as pure MetricFlow |
osl test <project_dir> |
Golden SQL, chunk-schema, joint round-trip, lexicon tests |
osl conformance test --level <level> <project_dir> |
Run the official conformance suite |
Example
Section titled “Example”$ osl validate ./caixabank-cartera-eu/✔ project.yml valid✔ models/customers.yml valid (3 models, 12 dimensions, 4 measures)✔ metrics/arr.yml valid✗ facets/meeting_transcripts.yml 2 errors E0201 chunk_schema missing required field 'embedding' at line 12 E0204 embedding.provider == tenant-byo requires .adapter at line 18✔ joints/customer.yml valid
Summary: 5 files valid, 1 file with errors. Exit code: 1.Reference clients Apache-2.0
Section titled “Reference clients ”The reference engine ships two client libraries (the spec does not require them — any HTTP client works):
- Python —
pyosl(REST + MCP). Recommended for Dagster jobs, dbt extensions, scripts. - TypeScript —
osl-client(REST). For web apps and Node.js.