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

SwitchValueDescriptionRemarks
-h, --helpPrint help and exit.
-V, --versionPrint the wcl version and exit.

Commands

- wcl parse

- wcl check

- wcl eval

- wcl set

- wcl fmt

- wcl diff

- wcl init

- wcl repl

- wcl lsp

- wcl wdoc

- wcl wdoc build

- wcl wdoc skill

- wcl wdoc pdf

- wcl wdoc serve

wcl parse

Parse a file and print the resulting document tree (forces full evaluation).

ArgumentRequiredDescriptionRemarks
filerequiredPath to a WCL source file.
SwitchValueDescriptionRemarks
--profileWrite a call-tree profile as JSON to stderr.
wcl parse site.wcl

wcl check

Parse and validate against the schema. Exit 0 = valid, 1 = parse error, 2 = schema violation.

ArgumentRequiredDescriptionRemarks
filerequiredWCL source file, or - to read from stdin.
SwitchValueDescriptionRemarks
--jsonEmit the result as a JSON object instead of human-readable diagnostics.
wcl check site.wcl

wcl eval

alias: get

Resolve a dotted path from the document root and print the value.

ArgumentRequiredDescriptionRemarks
filerequiredPath to a WCL source file.
pathrequiredDotted path to resolve from the document root.
SwitchValueDescriptionRemarks
--jsonEmit the value as JSON instead of the WCL display form.
--profileWrite an evaluation profile as JSON to stderr.
wcl eval site.wcl service.web.port

wcl set

Update the field at a dotted path with a new WCL expression, following imports to the declaring file.

ArgumentRequiredDescriptionRemarks
filerequiredEntry-point WCL file (imports are followed).
pathrequiredDotted path to the field to replace.
valuerequiredNew value, written as a WCL expression.
wcl set site.wcl service.web.port 9090u32

wcl fmt

Reformat to canonical form (comments and blank-line groupings preserved).

ArgumentRequiredDescriptionRemarks
filerequiredWCL source file, or - for stdin.
SwitchValueDescriptionRemarks
--in-placeOverwrite the file in place instead of printing to stdout.
--indentNSpaces per indentation level (default 2).
--no-trailing-commaDrop the trailing comma after match arms.
wcl fmt site.wcl --in-place

wcl diff

Compare two documents (evaluated views) and print the changed entities and fields.

ArgumentRequiredDescriptionRemarks
oldrequiredLeft side — a file or a <rev>:<path> git specifier.
newrequiredRight side — a file or a <rev>:<path> git specifier.
SwitchValueDescriptionRemarks
--formatwcl|jsonOutput format (default: a re-parseable WCL tree).
wcl diff HEAD~1:config.wcl config.wcl

wcl init

Scaffold a new project folder from a WCL template.

ArgumentRequiredDescriptionRemarks
templaterequiredBuilt-in name, user template, or path to a template .wcl.
destoptionalDestination directory (default: the answered name).
SwitchValueDescriptionRemarks
--listList the built-in templates and exit.
--defaultsUse defaults for every property — no prompts.
-D, --defineKEY=VALUEPreset a template property (repeatable).
wcl init minimal ./app -D name=app --defaults

wcl repl

Read-eval-print loop for ad-hoc WCL expressions.

ArgumentRequiredDescriptionRemarks
fileoptionalOptional file whose document is in scope in the REPL.
wcl repl site.wcl

wcl lsp

Run the WCL language server over stdio (for editor integrations).

wcl lsp

wcl wdoc

The wdoc static-site / skill generator. Has its own subcommands.

wcl wdoc build wdoc/book/main.wcl --out out/book

wcl wdoc build

Build a wdoc document into a static site.

ArgumentRequiredDescriptionRemarks
entryrequiredPath to the wdoc entry template (e.g. wdoc/book/main.wcl).
SwitchValueDescriptionRemarks
--outDIROutput directory for the generated site.
wcl wdoc build wdoc/book/main.wcl --out out/book

wcl wdoc skill

alias: md

Project a wdoc :ai_skill target into a SKILL.md + references/ folder.

ArgumentRequiredDescriptionRemarks
entryrequiredPath to the wdoc skill entry template.
SwitchValueDescriptionRemarks
--outDIROutput directory for the generated skill.
wcl wdoc skill wdoc/skill/main.wcl --out out/skill

wcl wdoc pdf

Render a wdoc document to a PDF.

ArgumentRequiredDescriptionRemarks
entryrequiredPath to the wdoc entry template.
SwitchValueDescriptionRemarks
--outFILEOutput PDF path.
--page-sizeA4|LetterPage size (default A4).
wcl wdoc pdf wdoc/book/main.wcl --out book.pdf

wcl wdoc serve

Build and serve a wdoc site locally with live reload.

ArgumentRequiredDescriptionRemarks
entryrequiredPath to the wdoc entry template.
SwitchValueDescriptionRemarks
--addrADDRAddress to bind (default 127.0.0.1:8080).
wcl wdoc serve wdoc/book/main.wcl --addr 127.0.0.1:8080