Mq
lastmod 2026-06-10created 2023-08-012 edits
(For message queues, see Message Queue)
A jq-style Markdown query language
About
- A CLI tool that queries, filters, and transforms Markdown documents with jq-like syntax, bringing the role jq plays for JSON to Markdown
- Turns Markdown into structured data so slicing, filtering, mapping, and transforming can easily be batch processed
- Especially useful for LLM workflows and input generation, since LLMs use Markdown as their default input format
- Used for manipulating Markdown in prompts/outputs, document management, content analysis, batch processing, and more
Supports many input/output formats: input such as markdown, mdx, html, csv, json, toml, xml, yaml; output such as table, grep, json - Parses automatically by file extension or the -I flag
Extracts headings, code blocks, links, and table cells with selectors (.h(1..3), .code("rust"), .link.url, etc.) Supports heading-based section extraction (section::section("Installation")) mq conv converts Excel, Word, and PDF to Markdown, which can then be chained with Unix pipes Content can be filtered and transformed with many built-in functions and selectors, and easily extended with custom functions Includes developer conveniences such as a REPL, LSP, VSCode extension, and debugger (mq-dbg) Runs in the browser without installation on the Playground Provides a WebAssembly build as mq-web Provides bindings for Elixir, Python, Ruby, Java, and Go MIT License, implemented in Rust See also
Favorite site