Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Modules

Standard Library

Standard modules are built into mq: use them with include or import, no installation needed.

ModuleDescription
jsonJSON parser and formatter
yamlYAML 1.2 parser and formatter
tomlTOML parser and formatter
xmlXML parser and formatter
htmlHTML parser and formatter (requires the css-selector build feature)
csvCSV / TSV parser, formatter, and blank-cell fill helpers
cborCBOR binary format support
semverSemantic versioning (SemVer) utilities
sectionMarkdown section extraction helpers
tableTable rendering utilities
fuzzyFuzzy string matching
toonTOON format support
grongron-style flattening into path = value; lines, and back
mdBuilders for generating Markdown (headings, tables, lists, callouts)
genGenerator combinators for property-based testing
testTesting framework (assert_eq, assert_true, …)

Extension Modules

These modules extend mq with additional parsers, utilities, and domain-specific languages. All modules support HTTP Import: no local installation required.

import "github.com/harehare/<module-name>"

Type to search by name or description, or click a category to filter.

ModuleCategoryDescription
json5.mqFormat ParsersJSON5: comments, trailing commas, unquoted keys
hcl.mqFormat ParsersHCL (HashiCorp Configuration Language), blocks, labels, attributes
pkl.mqFormat ParsersPKL: Apple's configuration language, with type annotations and collection literals
kdl.mqFormat ParsersKDL document language
ini.mqFormat ParsersINI file parser and serializer
ndjson.mqFormat ParsersNDJSON / JSON Lines
logfmt.mqFormat Parserslogfmt structured log lines (key=value)
ltsv.mqFormat ParsersLTSV (Labeled Tab-Separated Values) parser
cron.mqFormat ParsersCron expression parser and human-readable descriptions
jwt.mqFormat ParsersJWT decoder: inspect header and payload without verification
okf.mqFormat ParsersOKF (Open Knowledge Format) reader/writer, concept documents, cross-links, citations, log/index entries
url.mqFormat ParsersURL parsing, building, and relative-resolution utilities for mq.
changelog.mqFormat ParsersKeep a Changelog Markdown parser and serializer
dotenv.mqFormat Parsers.env file parser and serializer, quotes, comments, and escape sequences
jsonpath.mqFormat ParsersJSONPath (RFC 9535-style) query engine for mq's parsed JSON values
jsonschema.mqFormat ParsersJSON Schema validator
xpath.mqFormat ParsersAbbreviated XPath query engine for xml.mq's parsed value tree
codeowners.mqFormat ParsersGitHub CODEOWNERS parser and matcher
feed.mqFormat ParsersRSS 2.0 / Atom feed parser
gitignore.mqFormat Parsers.gitignore pattern parser and matcher
asciidoc.mqFormat ParsersAsciiDoc to Markdown converter
jsonld.mqFormat ParsersJSON-LD <script type="application/ld+json"> extractor
typst.mqFormat ParsersTypst markup parser, headings and single-line function-call statements
gomod.mqFormat ParsersTypst A Go module manifest (go.mod/go.sum) parser implemented as an mq module
sbom.mqFormat ParsersSPDX and CycloneDX SBOM (Software Bill of Materials) parser
fixedwidth.mqFormat ParsersFixed-width (fixed-length) text parser
justfile.mqFormat Parsersjustfile syntax parser
cedar.mqFormat ParsersCedar policy language parser
mermaid.mqDiagram & GraphMermaid diagrams, flowchart, sequence, pie, class
dot.mqDiagram & GraphGraphviz DOT, nodes, edges, attributes
graphql.mqDiagram & GraphGraphQL SDL, types, enums, interfaces, unions
tree.mqDiagram & GraphA tree-rendering utility module for mq
graph.mqDiagram & GraphGeneric graph algorithms
dockerfile.mqDevOps & InfrastructureDockerfile instruction parser
k8s.mqDevOps & InfrastructureKubernetes manifest parser, metadata, containers, images, ports, resources
gha.mqDevOps & InfrastructureGitHub Actions workflow parser, jobs, steps, triggers, matrix
openapi.mqDevOps & InfrastructureOpenAPI 3.x spec parser, paths, operations, schemas, security schemes
aws.mqDevOps & InfrastructureAWS CLI / SDK JSON response processor, filter, extract, and render Markdown tables for EC2, S3, IAM, Lambda, RDS, ECS, EKS, and 50+ other services
ansi.mqTerminal & TextANSI terminal escape code utilities
case.mqTerminal & TextString case conversion utilities implemented as an mq module
emoji.mqTerminal & TextGitHub-style emoji shortcode <-> Unicode emoji conversion
cmd.mqTerminal & TextCommand output parsers (ps, df, ls -l, git log, ...) that turn CLI output into structured data
kana.mqTerminal & TextFullwidth/halfwidth conversion, in both directions and limited to selected character classes
qrcode.mqGeneratorsQR Code (ISO/IEC 18004) encoder, ASCII-art and SVG rendering
badge.mqGeneratorsshields.io badge generator
sparkline.mqGeneratorsA pure Unicode sparkline renderer
lisp.mqInterpreters & ExamplesScheme-like Lisp interpreter
bf.mqInterpreters & ExamplesBrainfuck interpreter
jq.mqInterpreters & ExamplesImplementation of the jq JSON processor, written in mq
ds.mqData Structures & AlgorithmsData structures: min-heap, trie, union-find, sorted collections
bloom.mqData Structures & AlgorithmsBloom filter, a compact set answering "definitely not" or "probably in the set"
sketch.mqData Structures & AlgorithmsProbabilistic stream summaries with fixed memory and mergeable results
consistenthash.mqData Structures & AlgorithmsConsistent hash ring for sharding keys over nodes
simhash.mqData Structures & AlgorithmsSimHash fingerprints for near-duplicate detection
tfidf.mqData Structures & AlgorithmsFull-text ranking: BM25 search and TF-IDF keyword extraction
vector.mqData Structures & AlgorithmsVector math and nearest-neighbour search
parser_combinator.mqLibraries & ToolkitsA small parser-combinator toolkit, in the spirit of Rust's nom
diff.mqLibraries & ToolkitsText and array diffing utilities, built on mq's native Myers-diff engine
returns.mqLibraries & ToolkitsResult and Maybe types for railway-oriented error handling, inspired by dry-python/returns
markl.mqLibraries & ToolkitsMarkdown template engine with {{ expression }} tags, layouts, and per-site themes
docset.mqLibraries & ToolkitsTreats a directory of Markdown docs as one documentation set