Getting started
Install the CLI, write a config, validate it, then explore — formatting, the REPL, and the language server, and finally rendering a documentation site with wdoc.
1. Install
Install the wcl CLI from a source checkout:
2. Write a config
Declare a schema with decorators, then author data that matches it. @inline(0) binds the block label to a field; @default supplies a value when one is omitted; @children collects every nested block of a kind.
// site.wcl
@block("service")
type Service {
@inline(0) name: utf8
@default(80) port: u32
region: utf8
}
@document
type Config {
@children("service") services: list<Service>
}
service "web" {
region = "us-east-1"
}
service "api" {
port = 9090u32
region = "eu-west-1"
}
3. Check & evaluate
wcl check validates the document against its @document schema — exit 0 is OK, 1 a parse error, 2 a schema violation. wcl eval (alias wcl get) reads any value out by dotted path; --json emits a machine-readable form.
4. Format & edit
wcl fmt reformats canonically while preserving comments and blank-line grouping. wcl set rewrites a field at a dotted path with a new WCL expression, following imports back to the file that declares it (quote shell-special values).
5. Editor support
wcl lsp is a full language server (diagnostics, completion, hover, go-to-definition, code actions). It speaks stdio by default.
VS Code + tree-sitter
editors/vscode ships a minimal VS Code extension that spawns wcl lsp; editors/tree-sitter-wcl is a tree-sitter grammar stub for editors that consume them.
6. (Optional) Render docs with wdoc
If you want a static documentation site for your project, drop page blocks into a .wcl file and let wcl wdoc render them. The very page you're reading is built this way.
Next: skim the features tour, then keep the WCL language reference handy while you author.