mdv

The mdv command line: install, the nine commands, global options, exit codes.

Computer, run a Level 1 diagnostic. Nine commands answer; check does most of the work.

npm i -D mediva            # installs the `mdv` command
mdv check <files...> --schema <contract.mdv.md>

npx mediva <command> runs it without installing.

Commands

CommandWhat it does
mdv checkValidate Markdown documents against their *.mdv.md contracts
mdv fixApply every safe autofix in place
mdv initWrite the optional config or the agent skill (starters are being rebuilt)
mdv explainShow what a rule, diagnostic code, field kind, or document's contract means
mdv renderStrip mdv comments out into plain Markdown
mdv sourcesManage the external data that contracts ground themselves in
mdv lspRun the language server over stdio (what editors invoke)
mdv debugAuthoring and plugin diagnostics

Global options

Accepted by every command.

  • -h, --help — Show help; mdv <command> --help shows one command.
  • -v, --version — Show the installed mediva version.
  • --config FILE — Load an explicit config instead of discovering mediva.config.mjs.
  • --no-config — Ignore every config file; use only built-in rules.
  • --color, --no-color — Force or disable ANSI colour (default: auto-detect).

Exit codes are on mdv check.

On this page