CLI Reference
Version: 0.24.1-alpha
The WCL command-line interface — parse, check, evaluate, edit, format, the language server, and the wdoc generator.
Global switches
| Switch | Value | Description | Remarks |
|---|---|---|---|
| -h, --help | — | Print help and exit. | — |
| -V, --version | — | Print the wcl version and exit. | — |
Commands
- wcl eval
- wcl set
- wcl fmt
- wcl diff
- wcl init
- wcl repl
- wcl lsp
- wcl wdoc
wcl parse
Parse a file and print the resulting document tree (forces full evaluation).
| Argument | Required | Description | Remarks |
|---|---|---|---|
| file | required | Path to a WCL source file. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --profile | — | Write a call-tree profile as JSON to stderr. | — |
wcl parse site.wclwcl check
Parse and validate against the schema. Exit 0 = valid, 1 = parse error, 2 = schema violation.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| file | required | WCL source file, or - to read from stdin. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --json | — | Emit the result as a JSON object instead of human-readable diagnostics. | — |
wcl check site.wclwcl eval
alias: get
Resolve a dotted path from the document root and print the value.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| file | required | Path to a WCL source file. | — |
| path | required | Dotted path to resolve from the document root. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --json | — | Emit the value as JSON instead of the WCL display form. | — |
| --profile | — | Write an evaluation profile as JSON to stderr. | — |
wcl eval site.wcl service.web.portwcl set
Update the field at a dotted path with a new WCL expression, following imports to the declaring file.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| file | required | Entry-point WCL file (imports are followed). | — |
| path | required | Dotted path to the field to replace. | — |
| value | required | New value, written as a WCL expression. | — |
wcl set site.wcl service.web.port 9090u32wcl fmt
Reformat to canonical form (comments and blank-line groupings preserved).
| Argument | Required | Description | Remarks |
|---|---|---|---|
| file | required | WCL source file, or - for stdin. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --in-place | — | Overwrite the file in place instead of printing to stdout. | — |
| --indent | N | Spaces per indentation level (default 2). | — |
| --no-trailing-comma | — | Drop the trailing comma after match arms. | — |
wcl fmt site.wcl --in-placewcl diff
Compare two documents (evaluated views) and print the changed entities and fields.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| old | required | Left side — a file or a <rev>:<path> git specifier. | — |
| new | required | Right side — a file or a <rev>:<path> git specifier. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --format | wcl|json | Output format (default: a re-parseable WCL tree). | — |
wcl diff HEAD~1:config.wcl config.wclwcl init
Scaffold a new project folder from a WCL template.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| template | required | Built-in name, user template, or path to a template .wcl. | — |
| dest | optional | Destination directory (default: the answered name). | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --list | — | List the built-in templates and exit. | — |
| --defaults | — | Use defaults for every property — no prompts. | — |
| -D, --define | KEY=VALUE | Preset a template property (repeatable). | — |
wcl init minimal ./app -D name=app --defaultswcl repl
Read-eval-print loop for ad-hoc WCL expressions.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| file | optional | Optional file whose document is in scope in the REPL. | — |
wcl repl site.wclwcl lsp
Run the WCL language server over stdio (for editor integrations).
wcl lspwcl wdoc
The wdoc static-site / skill generator. Has its own subcommands.
wcl wdoc build wdoc/book/main.wcl --out out/bookwcl wdoc build
Build a wdoc document into a static site.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| entry | required | Path to the wdoc entry template (e.g. wdoc/book/main.wcl). | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --out | DIR | Output directory for the generated site. | — |
wcl wdoc build wdoc/book/main.wcl --out out/bookwcl wdoc skill
alias: md
Project a wdoc :ai_skill target into a SKILL.md + references/ folder.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| entry | required | Path to the wdoc skill entry template. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --out | DIR | Output directory for the generated skill. | — |
wcl wdoc skill wdoc/skill/main.wcl --out out/skillwcl wdoc pdf
Render a wdoc document to a PDF.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| entry | required | Path to the wdoc entry template. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --out | FILE | Output PDF path. | — |
| --page-size | A4|Letter | Page size (default A4). | — |
wcl wdoc pdf wdoc/book/main.wcl --out book.pdfwcl wdoc serve
Build and serve a wdoc site locally with live reload.
| Argument | Required | Description | Remarks |
|---|---|---|---|
| entry | required | Path to the wdoc entry template. | — |
| Switch | Value | Description | Remarks |
|---|---|---|---|
| --addr | ADDR | Address to bind (default 127.0.0.1:8080). | — |
wcl wdoc serve wdoc/book/main.wcl --addr 127.0.0.1:8080