helix schemas¶
Emit machine-readable JSON Schema artifacts for every component the
binary knows about, plus a curated schema for the top-level YAML DSL.
Use these with yaml-language-server, IDE autocomplete, or any CI
linter that consumes JSON Schema.
Usage¶
helix schemas # writes ./schemas/components/*.json + ./schemas/dsl/workflow.json
helix schemas <out-dir> # writes <out-dir>/components/*.json + <out-dir>/dsl/workflow.json
helix schemas --print # prints one combined JSON doc to stdout
Flags¶
| Flag | Default | Description |
|---|---|---|
--print |
off | Write a single combined JSON document (components + DSL) to stdout instead of files. |
-h, --help |
— | Print usage and exit. |
The first non-flag argument is the output directory. Defaults to
./schemas/.
What is produced¶
<out-dir>/
├── components/
│ ├── <scheme>.json # one schema per Describable component
│ └── index.json # summary {scheme, description, uri_format, role}
└── dsl/
└── workflow.json # top-level YAML DSL schema (workflow + step + rag-* bodies)
Each component schema:
- is JSON Schema draft-07
$id: a stable URL that identifies the component's schemaproperties: one entry perComponentDescriptor.Param, typed against the descriptor (boolean,integer,number,duration,enum, defaultstring). Enum descriptors emitenum: [...]. Thedurationtype maps tostringwith a regex pattern + anx-helix-type: durationhint.required: every param flaggedRequiredin the descriptor- vendor extensions:
x-helix-scheme,x-helix-uri-format,x-helix-role additionalProperties: false
The DSL schema (dsl/workflow.json) describes the recognised
top-level keys (workflows:, connectors:, error-handlers:,
imports:) and the inner workflow / step shapes. The RAG step
bodies (rag-ingest, rag-chunk, rag-embed, rag-raptor,
rag-retrieve, rag-synthesize, rag-docstore, rag-graph-build,
rag-graph-query) are described in full so editor autocomplete works
for them. Non-RAG steps accept arbitrary objects.
Behavior notes¶
- Requires
$HELIX_LICENSE. Verified at process start. - Output is deterministic (schemes sorted alphabetically) — safe to commit and diff.
--printwrites a combined doc withcomponents: {scheme: schema}plusdsl: {workflow schema}. Useful for CI consumers that want a single artifact.- Files are written with mode 0644; directories with mode 0755.
- Tells you how to enable
yaml-language-serverat the end: add# yaml-language-server: $schema=<dsl/workflow.json>to the top of your YAML.
Examples¶
Generate every schema into ./schemas/:
Generate to a custom directory:
Pipe a combined doc into jq:
Wire VS Code's YAML extension to the DSL schema (in .vscode/settings.json):
Source¶
cmd/helix/schemas.go lines 33-115 (cmdSchemas),
122-177 (buildComponentSchema),
202-289 (dslWorkflowSchema),
320-450 (dslStepSchema).
See also¶
helix components— same data, human-readable.- Schemas index