Docs that don't drift

Write it once.
Sync it everywhere.

mdt keeps your READMEs, doc comments, and docs sites in sync from a single markdown template. One update command. CI catches drift before merge.

Terminal demo: mdt check catches doc drift, mdt update syncs it

How it works

Three steps to synced docs

No daemon, no lockfile, no vendor lock-in. Templates are plain markdown with comment tags.

Define once

Write a block in a *.t.md template file. That block is the single source of truth for its content.

Reference anywhere

Place a consumer tag in any markdown file — or inside source doc comments with //! and /// prefixes.

Check & sync

mdt check verifies every consumer is up to date; mdt update syncs them. Run check in CI so drift never merges.

The shape of it

Markdown in. Markdown out.

install.t.md — source

<!-- {@install} -->

npm install my-lib

<!-- {/install} -->

readme.md — consumer

<!-- {=install} -->

npm install my-lib

<!-- {/install} -->

Built in

Everything a docs-sync tool should have

Data interpolation

Render blocks with minijinja templates fed by project data — versions, package names, anything in mdt.toml.

Transformers

Trim, indent, wrap, uppercase, or line-prefix content as it's injected — the same template fits every context.

CI verification

mdt check exits non-zero when any block has drifted, so stale docs fail the build like a broken test.

Source code comments

Consumers work inside //!, ///, and other comment prefixes — crate docs stay synced too.

LSP for your editor

Diagnostics, hover previews, completions, and rename across blocks via mdt lsp — free for any LSP client.

MCP server

AI assistants read and verify your doc graph through mdt mcp, so agents stop shipping stale docs.

Install

One binary. No runtime.

npmglobal
npm install -g @m-d-t/cli
cargocrates.io
cargo install mdt_cli
releasebinaries
github.com/ifiokjr/mdt/releases

Stop chasing doc drift.