mq - A jq-style Markdown query language
Key point
mq, a CLI tool that processes Markdown documents as structured data to support LLM workflows and data transformation, has been released.
Details
mq is a CLI tool that lets you query, filter, and transform Markdown documents using syntax similar to JSON's jq. By treating Markdown as structured data, it enables batch operations such as slicing, filtering, and mapping.
It is especially specialized for manipulating Markdown, a key input format for LLMs, making it very useful for prompt and output management, content analysis, and LLM workflow automation.
Key features include:
- Support for diverse formats: Supports markdown, mdx, html, csv, json, toml, xml, yaml, and more, with automatic parsing available via file extensions or flags.
- Sophisticated selectors: Supports extracting headings, code blocks, links, and table cells, as well as section-level extraction based on titles.
- Document conversion: The
mq convcommand converts Excel, Word, and PDF to Markdown, which can then be immediately piped into Unix pipelines. - Developer-friendly environment: Implemented in Rust, it provides a REPL, LSP, VSCode extension, and debugger. It also supports bindings for various languages including Python, Go, and Java.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.