WCL

Heavy development, not production ready.

The language, APIs, and wdoc output can change at any time without notice.

Typed configuration & schema language

One language for every shape of data.

WCL lets you express structured data the way it actually is: records, unions, interfaces, and decorators. Gather it into a document model that validates itself, then project that single model into config, HTML, Markdown and books.

Open source · built in the open by Wil Taylor

service.wclwcl
@block("service")
type Service {
  @inline(0)   name: utf8     // service "web" → name = "web"
  @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"
}

A taste

A document is fields and blocks. A schema is the rules they follow.

Declare your types with decorators that describe how raw syntax maps onto them: @inline, @default, @children. The data reads like the thing it describes, and the document model validates the whole shape before anything downstream sees it.

Why WCL

Built to express data naturally, and keep it honest.

A small, typed core that scales from a single config file to a complete documented model.

Flexible structure

Map almost any data structure with a statically typed core: records, vectors and tensors, union types, interfaces, and decorators that bind raw syntax to your model. Express the shapes you actually have. WCL checks them before runtime.

Schemas

Declare a schema once and validate your data against it. WCL checks types, required fields, and constraints, so mistakes show up before anything downstream runs.

Natural, block-based syntax

Blocks and fields read like the thing you're describing: service "web" { … }. Not a wall of nested brackets.

One format, multiple uses

The same WCL format works as typed application configuration and as the source for documentation: pages, sites and books rendered with wdoc.

Data–presentation separation

Keep your data model separate from how it's shown. Project the same typed data structures into documentation: many views and layouts over one validated source, with no copy-paste.

Rich diagram support

wdoc draws diagrams straight from WCL: flowcharts, sequence and state diagrams, charts, timelines, trees, and class and DB tables. Layout and edge routing are automatic, and wdoc themes each diagram to match the page.

Getting started

Install it and scaffold your first project.

Grab a prebuilt binary with the install script, then let wcl init scaffold a ready-to-build project: a book, a presentation deck, and more.

  1. Install the CLI

    curl -fsSL https://wcl.dev/install.sh | sh -s -- --pre

  2. Scaffold a new book

    wcl init book ./my-book

  3. …or a presentation deck

    wcl init presentation ./my-deck