Describe
Types, defaults, derived members, and constraints live in one flat schema. No domain keywords — graphs, configs, and hardware are all just records, references, and rules.
Describe
Types, defaults, derived members, and constraints live in one flat schema. No domain keywords — graphs, configs, and hardware are all just records, references, and rules.
Generate
Comprehensions and derivations turn a description into canonical JSON, byte-identical on every run and every implementation — and, with @render, into YAML, indented JSON, or text from a template, one file per element.
Validate
Bind external documents to the same types. Every failure is a diagnostic with a path, a code, and a root cause — never a cascade.
// describe: types carry the value rulestype Service = { name: /[a-z][a-z0-9-]*/ port?: 1024..65535 = 8080 replicas?: 1..64 = 1 timeout?: quantity<Time> = 250ms endpoint = `${name}:${port}` // derived, never supplied assert grpc_ports: name != "grpc" || port >= 9000 else warn `grpc convention is 9000+`}
// generate: values from the descriptionexport output demo: Service[] = [ { name: "gateway" } { name: "auth", port: 9001, replicas: 2 }]
// validate: bind external documents to the same schemainput deployed: Service[]{ "demo": [ { "name": "gateway", "port": 8080, "replicas": 1, "timeout": { "value": 0.25, "unit": "s" }, "endpoint": "gateway:8080" }, { "name": "auth", "port": 9001, "replicas": 2, "timeout": { "value": 0.25, "unit": "s" }, "endpoint": "auth:9001" } ]}The same Service type that generated demo validates deployed documents from the outside world:
decl validate services.decl --input deployed=prod.jsonnpm install -g decl-langThe TypeScript reference implementation: decl and the decl-lsp language server (Node.js ≥ 22).
pip install decl-langThe native Python implementation: decl, decl-lsp, and a Python API — no Node.js.
cargo install decl-langThe native Rust implementation: decl and decl-lsp with no Node or wasm.
brew install luuvish/tap/decl-langThe npm package through a Homebrew tap.
The same language server, formatter, and evaluator in every implementation; the editor extensions and the REPL are clients of them.
decl check services.decl # the static checks, and nothing elsedecl fmt --check services.decl # the canonical formdecl repl services.decl # a session over the module: expressions, :type, :trace, undodecl-lsp --stdio # what VS Code, Zed, Neovim, Helix, and Emacs talk to© 2026 Luuvish. Decl is open source under the MIT License.
Type: Literata and IBM Plex, under the SIL Open Font License. Built with Astro Starlight.