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
csvCSV / TSV parser and formatter
cborCBOR binary format support
semverSemantic versioning (SemVer) utilities
sectionMarkdown section extraction helpers
tableTable rendering utilities
fuzzyFuzzy string matching
toonTOON format support
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>"

Format Parsers

ModuleDescription
json5.mqJSON5 — comments, trailing commas, unquoted keys
hcl.mqHCL (HashiCorp Configuration Language) — blocks, labels, attributes
pkl.mqPKL — Apple’s configuration language, with type annotations and collection literals
kdl.mqKDL document language
ini.mqINI file parser and serializer
ndjson.mqNDJSON / JSON Lines
logfmt.mqlogfmt structured log lines (key=value)
cron.mqCron expression parser and human-readable descriptions
jwt.mqJWT decoder — inspect header and payload without verification
okf.mqOKF (Open Knowledge Format) reader/writer — concept documents, cross-links, citations, log/index entries
url.mqURL parsing, building, and relative-resolution utilities for mq.
changelog.mqKeep a Changelog Markdown parser and serializer
dotenv.mq.env file parser and serializer — quotes, comments, and escape sequences
jsonpath.mqJSONPath (RFC 9535-style) query engine for mq’s parsed JSON values
jsonschema.mqJSON Schema validator
xpath.mqAbbreviated XPath query engine for xml.mq’s parsed value tree

Diagram & Graph

ModuleDescription
mermaid.mqMermaid diagrams — flowchart, sequence, pie, class
dot.mqGraphviz DOT — nodes, edges, attributes
graphql.mqGraphQL SDL — types, enums, interfaces, unions
tree.mqA tree-rendering utility module for mq

DevOps & Infrastructure

ModuleDescription
dockerfile.mqDockerfile instruction parser
k8s.mqKubernetes manifest parser — metadata, containers, images, ports, resources
gha.mqGitHub Actions workflow parser — jobs, steps, triggers, matrix
openapi.mqOpenAPI 3.x spec parser — paths, operations, schemas, security schemes
aws.mqAWS CLI / SDK JSON response processor — filter, extract, and render Markdown tables for EC2, S3, IAM, Lambda, RDS, ECS, EKS, and 50+ other services

Terminal & Text

ModuleDescription
ansi.mqANSI terminal escape code utilities
case.mqString case conversion utilities implemented as an mq module
emoji.mqGitHub-style emoji shortcode <-> Unicode emoji conversion

Generators

ModuleDescription
qrcode.mqQR Code (ISO/IEC 18004) encoder — ASCII-art and SVG rendering
badge.mqshields.io badge generator

Interpreters & Examples

ModuleDescription
lisp.mqScheme-like Lisp interpreter
bf.mqBrainfuck interpreter
jq.mqImplementation of the jq JSON processor, written in mq

Libraries & Toolkits

ModuleDescription
parser_combinator.mqA small parser-combinator toolkit, in the spirit of Rust’s nom
diff.mqText and array diffing utilities, built on mq’s native Myers-diff engine
template.mqA lightweight Mustache/Handlebars-style templating engine