mdqy
jq for markdown — query markdown documents through a hybrid selector + jq-style DSL, rewrite them in place, and render to a terminal.

Install
Homebrew (macOS, Linux):
Scoop (Windows):
Shell installer (Unix):
|
PowerShell installer (Windows):
irm https://github.com/pawelb0/mdqy/releases/latest/download/mdqy-installer.ps1 | iex
From crates.io:
Prebuilt binaries for every release: github.com/pawelb0/mdqy/releases/latest.
On macOS, direct downloads need xattr -d com.apple.quarantine ./mdqy
once before first run.
The tty feature pulls mdcat in for terminal rendering. Default
builds emit markdown or JSON.
Documentation
Start with docs/quickstart.md. Reference under
docs/: language.md, selectors.md, transforms.md,
architecture.md.
Usage
mdqy '<EXPR>' [PATH...]
Paths can be files or directories. Directories walk recursively and
honour .gitignore, .ignore, and hidden-file rules.
Query examples
Output format
Default is auto:
- stdout is a terminal +
ttyfeature compiled in → render - stdout is piped → raw markdown (Node results) or JSON (scalars)
Override with --output md | json | tty | text.
Transforms
-U writes in place via atomic rename. --dry-run prints a
unified diff and exits 0.
Multi-file
Library use
use ;
let q = compile?;
for v in q.run_tree
See docs.rs/mdqy for the full API.
Tooling
License
MPL-2.0. See LICENSE.