Contract-first generation
VDL lets teams write compact contracts that humans can review and machines can validate. From one .vdl file, generate type-safe models, RPC clients and servers, schemas, docs, and custom artifacts for multiple languages.
Open source, deterministic, and designed for normal development and CI workflows.
How it works
A VDL project starts with declarations, not framework code. The analyzer enforces the model, then plugins generate the files each application needs.
.vdl
source files
Plugin
transforms IR
Code
type-safe outputs
What VDL gives you
Readable
contracts for humans
Type-safe
generated code
Multi-lang
plugin outputs
CI-ready
format and checks
The core idea
VDL separates what your systems agree on from how each toolchain consumes it. The source stays readable, while generated artifacts stay precise and type-safe.
Use type, enum, const, include, docstrings, arrays, maps, inline objects, references, and spreads to describe the contract itself in a review-friendly format.
Use annotations such as @rpc, @event, @deprecated, or your own team-specific tags without changing the language grammar.
Official and custom easy to write plugins receive the resolved IR and generate language-specific code, schemas, docs, or internal artifacts.
Workflow
The day-to-day loop is intentionally small: write the contract, configure plugins, and generate checked output.
Install VDL with the shell installer, Homebrew, PowerShell, npm, Docker, or release binaries.
Create readable .vdl files for shared types, HTTP RPC operations, event payloads, documentation, and metadata.
Point vdl.config.vdl at your schema and plugins, then run vdl generate locally or in CI.
Use cases
VDL is most useful when several parts of a product need the same contract, but each part needs it in its own language or format.
Generate type-safe models for frontend, backend, workers, and microservices from the same source contract.
Model request and response shapes once, then generate typed clients, servers, and OpenAPI documents for frontend-to-backend communication.
Keep service boundaries explicit with shared schemas, generated packages, and stable contracts that can be checked in CI.
Generate JSON Schema, schema explorers, metadata exports, and documentation from docstrings and resolved types.
Use @event declarations to generate subject builders and catalogs for event-driven systems.
Write custom plugins for your framework conventions, templates, catalogs, policies, or platform-specific glue code.
Read next
The documentation starts with concepts, then moves into installation, configuration, plugin usage, and reference details.
Overview
Understand the project philosophy, the plugin-first model, and common use cases.
Read overviewLanguage
Learn the VDL syntax in order, from files and comments to naming and validation.
Learn syntaxProject setup
Configure vdl.config.vdl, plugin sources, output directories, remotes, hooks, and lock files.
Configure generationExtension
Build custom JavaScript or TypeScript plugins that consume the resolved VDL IR.
Write a pluginReady to try it
Start small: define a type, add a plugin, and run the generator. The same workflow scales to shared models, RPC services, event contracts, documentation, and private platform tooling.
Generated files are regular files: inspect them, test them, commit them, or regenerate them in CI.