DTL, Domain Transport Language
DTL is AlifZetta's native configuration and data-transport format, a JSON successor with 10 typed primitives, indent-based structure, and sub-microsecond parsing. It replaces JSON, YAML, and XML across the AlifZetta platform.
Human-first syntax. Machine-precise types. Rust reference implementation. Dual-licensed MIT / Apache 2.0.
Why not just use JSON, YAML, or TOML?
Configuration and data-transport formats set the ceiling on how readable a system can be. JSON, YAML, and TOML each get parts of that right, and each carries decades of accumulated ceremony that a modern format can shed. DTL is what happens when a data format is designed from the ground up for both human eyes and machine precision, in 2024 rather than 2001.
DTL vs JSON
JSON is universal, but it was designed for JavaScript object literals, not humans typing configs. It has no comments (a decision the format's inventor publicly regrets), no typed sizes or durations, and forces you to quote every key and comma-separate every field. The result is visual noise that adds nothing.
DTL vs YAML
YAML fixed some of JSON's readability problems and introduced entire new ones. Indentation is significant, but so is the distinction between null, nil, ~, and blank, three of which parse differently in different implementations. The Norway problem (NO parsing as false) is still real. DTL uses one clear rule: @key value with two-space indent, and typed primitives inferred from value shape rather than declared.
DTL vs TOML
TOML is clean for flat configs but visibly strains at nested data, deep structures require bracket-heavy table paths like [server.tls.certificates]. DTL's indent-based blocks feel natural at any depth and read top-to-bottom in the same shape they were written.
| Feature | What it means | DTL | JSON | YAML | TOML |
|---|---|---|---|---|---|
| Comments | Lines starting with # | yes | no | yes | yes |
| Typed sizes | 8GB → bytes automatically | yes | no | no | no |
| Typed durations | 30s → milliseconds automatically | yes | no | no | no |
| Multiple boolean spellings | true/yes/enabled | yes | no | partial | no |
| Quote-free strings | No wrapping quotes needed | yes | no | partial | no |
| Nested structure | Indent, not brackets | yes | no | yes | flat |
| Whitespace-safe | Trailing spaces do not change value | yes | yes | no | yes |
| Ambiguity-free null | One way to say "empty" | yes | yes | no | yes |
| Round-trip to JSON | Bidirectional converter shipped | yes | lossy | lossy |
DTL vs JSON, side by side
The same service definition, expressed in DTL and in JSON. Count the characters that carry no meaning, the braces, the quotes, the commas, the trailing whitespace fights.
@server AlifZetta API
@host 0.0.0.0
@port 3000
@workers 8
@memory 32GB
@timeout 30s
@tls enabled
{
"server": {
"_header": "AlifZetta API",
"host": "0.0.0.0",
"port": 3000,
"workers": 8,
"memory": "32GB",
"timeout": "30s",
"tls": "enabled"
}
}
DTL: 104 bytes. JSON: 190 bytes. A 45% reduction, before you count the readability. And JSON lost the typed memory and timeout along the way.
Syntax at a glance
Every DTL value is one of ten types. Type is inferred from the shape of the value, no annotations, no schemas required. The parser recognises each pattern deterministically, so @port 3000 is always an integer, @ram 8GB is always a size, and @active true is always a boolean.
The 10 types
| Example | Type | Notes |
|---|---|---|
@name AlifZetta | String | Any UTF-8 text after the key |
@count 42 | Integer | i64 · signed 64-bit |
@rate 0.001 | Float | f64 · IEEE 754 double |
@active true | Boolean | true · false · yes · no · enabled · disabled |
@ram 8GB | Size | B · KB · MB · GB · TB → .as_bytes() |
@timeout 30s | Duration | ms · s · m · h · d → .as_millis() |
@cores 0 1 2 3 | Number list | Space-separated · Vec<i64> |
@empty | Empty (null) | Bare key · absence value |
@block | Block | Two-space indent · preserves insertion order |
@text | | Multi-line text | Pipe-delimited heredoc · newlines preserved |
Multi-line text (heredoc)
End the key line with a bare |, then indent continuation lines. Newlines are preserved literally; the parser strips the common leading indent.
@readme |
Welcome to AlifZetta.
This paragraph is preserved
with all newlines and indentation
relative to the opening indent.
Comments
Any line starting with # is a comment. Inline comments (trailing the value on the same line) are reserved for a future minor release and currently parse as string content.
Rules on one page
- KeysEvery line starts with
@key. No exceptions. - BlocksTwo-space indentation nests. No braces.
- CommentsAny line starting with
#is skipped. - StringsEverything after the key is the value. No quotes needed.
- ListsSpace-separated numbers become a list automatically.
- Multi-lineEnd the key line with
|, indent continuation. - BooleansSix spellings,
true false yes no enabled disabled. - UnitsNumbers with
GB,MB,s,msare typed values, not strings.
Try DTL live
Type or paste DTL on the left, press Parse, and see the parsed JSON on the right. The Parse button posts to https://axz.si/api/dtl/parse, which runs the actual Rust reference parser server-side, the same one shipped in the dtl-parser crate. A local in-browser fallback also runs live for offline use.
Click Parse to run the DTL reference parser on the AlifZetta server.
The endpoint returns:
{
"ok": true,
"json": { ... parsed document ... },
"bytes_in": N,
"bytes_out": M
}
For local parsing while you type, the in-browser reader also runs as a preview.
/api/dtl/parse (Rust reference parser).
DTL saves,
Using DTL
DTL ships in three shapes: a Rust crate you embed in your application, a command-line tool for shell workflows, and a public HTTP API for any language that can send a POST request.
1 · Install, pick your runtime
DTL ships across five runtimes today. All four language packages are authored by Padam Sundar Kafle (AlifZetta) and dual-licensed MIT / Apache 2.0. The Rust reference crate is bundled with ZettaOS and awaiting crates.io publication.
| Runtime | Package | Install command |
|---|---|---|
| Rust (reference impl) | dtl-parser on crates.iosoon |
cargo add dtl-parser |
| Node.js | dtl-parser on npm · Yarn |
npm install dtl-parser |
| .NET / Windows | Dtlaz.Parser on NuGet |
Install-Package Dtlaz.Parser |
| Python | dtl-parser on PyPI |
pip install dtl-parser |
| VS Code (syntax) | DTLAz.dtl-language |
Marketplace → Install |
2 · Parse from Rust
use dtl::DtlDocument;
let doc = dtl::parse("@name AlifZetta\n@port 3000\n@active true").unwrap();
assert_eq!(doc.get_str("name"), Some("AlifZetta"));
assert_eq!(doc.get_int("port"), Some(3000));
assert_eq!(doc.get_bool("active"), Some(true));
// Nested access via dot-path
let config = dtl::parse(source).unwrap();
config.at_int("server.port"); // Some(3000)
config.at_bool("server.tls.enabled"); // Some(true)
// Typed sizes and durations
doc.root.get_bytes("ram"); // Some(34_359_738_368) for "32GB"
doc.root.get_millis("timeout"); // Some(30_000) for "30s"
3 · Build DTL programmatically
use dtl::DtlBuilder;
use dtl::value::SizeUnit;
let doc = DtlBuilder::new()
.str("name", "ZettaOS")
.int("port", 3000)
.bool("gpu_required", false)
.size("ram", 8, SizeUnit::GB)
.block("compute", |b| b
.int("cores", 6)
.str("simd", "neon")
.bool("speculative", true))
.build();
println!("{}", doc.to_dtl());
4 · The dtl command-line tool
# Everyday commands
dtl parse config.dtl # Parse and pretty-print
dtl validate config.dtl # Validate syntax without emitting output
dtl to-json config.dtl # DTL → JSON on stdout
dtl from-json package.json # JSON → DTL on stdout
dtl get config.dtl server.port # Read a value at a dot-path
dtl compare config.dtl # Show byte-count vs equivalent JSON
dtl info # Version, license, capabilities
5 · The public HTTP API
Any language that can send a POST request can parse DTL server-side using https://axz.si/api/dtl/parse. Send {"text": "..."} and get back {"ok": true, "json": {...}}.
# From curl
curl -sS -X POST https://axz.si/api/dtl/parse \
-H 'Content-Type: application/json' \
-d '{"text":"@name AlifZetta\n@port 3000\n@active true"}'
# Response
{
"ok": true,
"json": { "name": "AlifZetta", "port": 3000, "active": true },
"bytes_in": 39,
"bytes_out": 60
}
The DTL specification, condensed
DTL is a text format. Files use the .dtl extension. The recommended MIME type is text/vnd.dtl. Encoding is UTF-8, without a byte-order mark. Line endings are LF or CRLF, both parse identically. Indentation is fixed at two spaces per level.
Grammar (EBNF-style, informative)
Well-formedness rules
- Every non-blank, non-comment line begins with
@or with whitespace followed by@. - The number of leading spaces on any line must be a multiple of two.
- A child line's indent must be exactly two spaces deeper than its parent's, no skipping levels.
- Keys within a single block are unique. Duplicate keys are an error, not a silent overwrite.
- Type is deterministic, the first rule that matches wins. Order: integer, float, boolean, size, duration, list, heredoc, then string as fallback.
Reserved directives (v2.1 roadmap)
Two directives are reserved for the next minor release and will parse as string values in v2.0:
@include ./other.dtl, inline another DTL document at this point, with circular-include detection.@schema path/to/schema.dtl, declare an expected shape; the parser will validate types and required keys against it.
Ecosystem & applications
DTL is production infrastructure. It runs live inside AlifZetta's operating system and behind axz.si's public services. The reference tooling is deliberately small and boring, a well-tested Rust parser, a plain CLI, and a converter round-trippable to JSON. That is the whole surface area.
Rust reference parser
dtl-parser · the canonical implementation. Ships the library API (dtl::parse, DtlBuilder), 10 typed value accessors, and a comprehensive test suite. Benchmarked against serde_json with Criterion.
v2.0.0 · zero external runtime dependencies · MSRV Rust 1.70 · crates.io publication in progress
Node.js · npm / Yarn
dtl-parser on npm (also on Yarn). Same 10-type coverage. Author: Padam Sundar Kafle. Install with npm install dtl-parser.
v1.0.0 · pure-JS · zero deps · works in Node and modern browsers
.NET / Windows · NuGet
Dtlaz.Parser on NuGet, the Windows/.NET port. Install with Install-Package Dtlaz.Parser from Package Manager or dotnet add package Dtlaz.Parser.
v1.2.0 · .NET Standard 2.0+ · same 10 typed primitives
Python · PyPI
dtl-parser on PyPI, smart CLI + parser with enum validation, autofix, and a colourful terminal. Install with pip install dtl-parser.
v1.4.1 · MIT · pure Python · CLI entry point
VS Code · Marketplace
DTLAz.dtl-language, syntax highlighting, validation, IntelliSense, and tooling for .dtl files. Publisher: Domain Transport Language By AlifZeta Superintelligence.
Search "DTL" in the VS Code Extensions pane, or install from the Marketplace URL above.
Command-line tool
dtl CLI, preinstalled at /usr/local/bin/dtl on ZettaOS, or shipped inside the Rust crate. Subcommands: parse, validate, to-json, from-json, get, compare, info.
Round-trip JSON conversion · dot-path value read · byte diff vs JSON
HTTP API
POST /api/dtl/parse · public endpoint at https://axz.si. Send {"text": "..."}, receive {"ok": true, "json": {...}, "bytes_in": N, "bytes_out": M}. Powered by the Rust CLI on the server.
Returns 400 on parse fail · 403 on empty · 503 if the CLI is unavailable
JSON interop
Bidirectional. dtl to-json and dtl from-json are round-trip stable for every JSON document, you can bring existing configs into DTL without loss, and export DTL to any JSON-only system.
JSON types map cleanly onto DTL's string, integer, float, boolean, empty, block
Where DTL runs today
- AlifZetta ZettaOS, every system configuration file, every vGPU compute descriptor, every service definition speaks DTL natively.
- axz.si predictive substrate, 46+ domain knowledge bases published as DTL documents at axz.si/substrate/. Every entry carries
@predicts_next,@leading_indicators,@confidence,@horizon,@evidence. - AlifZetta blog + docs, front-matter, service manifests, and page metadata across the site all use DTL rather than YAML front-matter.
- zetta-daemon, the AlifZetta system daemon accepts and emits DTL over its HTTP+WebSocket API.
More editor support
VS Code has a first-party extension (DTLAz.dtl-language) with syntax highlighting, validation, and IntelliSense, install it from the Marketplace. Neovim and Sublime Text plugins are on the near-term roadmap; until they ship, YAML syntax highlighting is a serviceable stand-in, the visual shape is close enough that most editors get the colours right by accident.planned
More language bindings
DTL is already shipping in five runtimes (Rust reference, Node.js, .NET, Python, and VS Code). Additional community bindings for Go, Ruby, Elixir, and Swift are welcome. The specification section above is complete enough to implement DTL in an afternoon; the JSON converter is a good first test target.
FAQ
What is DTL?
DTL (Domain Transport Language) is AlifZetta's native configuration and data-transport format. It uses indented @key value syntax with 10 typed primitives, string, integer, float, boolean, size, duration, list, empty, block, multi-line text. It replaces JSON, YAML, and XML across the AlifZetta platform, and is dual-licensed MIT / Apache 2.0.
Who invented DTL?
DTL was designed and implemented by Padam Sundar Kafle, Founder and Chief Engineer of AlifZetta, as the native data format for the AlifZetta Superintelligence platform (ZettaOS). The reference parser is written in Rust and open-sourced under MIT / Apache 2.0.
Why not just use JSON or YAML?
JSON has no comments, no typed sizes or durations, and requires quotes plus commas that add visual noise without adding information. YAML is famous for indentation footguns and the null / nil / ~ ambiguity, three of which parse differently in different implementations. DTL uses one syntax rule (@key value with two-space indent), typed primitives inferred from value shape, and comments as a first-class feature.
Is DTL open source?
Yes. The DTL reference parser (dtl-parser Rust crate) is dual-licensed under MIT and Apache 2.0. The specification itself is public and unencumbered, any language may implement a DTL parser without permission.
What are DTL's 10 types?
String, Integer (i64), Float (f64), Boolean (six spellings, true/false/yes/no/enabled/disabled), Size (e.g. 8GB → bytes), Duration (e.g. 30s → milliseconds), Number list (space-separated), Empty (null), Block (indented children), Multi-line text (pipe-delimited heredoc). Every type is auto-detected from the value shape, no annotations needed. See the syntax section for examples.
How do I install the DTL parser?
DTL ships in five runtimes today. Node.js: npm install dtl-parser (also on Yarn). .NET / Windows: Install-Package Dtlaz.Parser from NuGet. Python: pip install dtl-parser from PyPI. VS Code: install DTLAz.dtl-language from the Marketplace. The Rust reference crate ships with ZettaOS and is awaiting crates.io publication. A public HTTP API is also available at https://axz.si/api/dtl/parse.
Can I convert JSON to DTL?
Yes. Conversion is bidirectional. From the CLI: dtl from-json package.json > package.dtl, and dtl to-json config.dtl > config.json. From Rust: dtl::from_json(text) and dtl::to_json(doc). The converter is round-trip stable for every JSON document.
Is DTL faster than JSON?
For small-to-medium documents, DTL parses in sub-microsecond time, competitive with serde_json on the same data. DTL documents are typically 30 to 45 percent smaller than the equivalent JSON, which shortens I/O time and reduces cache pressure. Criterion benchmarks vs serde_json ship with the crate.
What is @key value syntax?
Every line in DTL is either a comment starting with #, or an @-prefixed key followed by an optional value: @name AlifZetta or @port 3000 or @ram 8GB. Blocks are opened by leaving the value empty and indenting the children two spaces. No braces, no quotes, no commas. This is the whole grammar you need to write DTL.
Where is DTL used?
DTL is the native data format across AlifZetta's ZettaOS, every system config, every vGPU compute descriptor, every service definition. It also drives the public predictive substrate at axz.si/substrate/ (46+ domain knowledge bases), and is available as an HTTP API at /api/dtl/parse for external integrations.
Contact & contribute
DTL is a small, well-tested format. Feedback, bug reports, and language-binding contributions are welcome. If you want a DTL parser in your favourite language, the specification section on this page is complete enough to implement one in an afternoon.
crates/dtl-parser · Rust crate public release in progresssoon