mq

Jq-like command-line tool for querying and processing markdown

brewmacoslinux
Try with needOr install directly
Source

About

Jq-like command-line tool for markdown processing

Commands

mq

Examples

Extract all headings from a markdown file$ mq '.headings' document.md
Filter markdown content by heading level$ mq '.content[] | select(.level == 2)' file.md
Extract all links from markdown file$ mq '.links[]' document.md