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

Cookbook

The Cookbook is a collection of task-first recipes for mq. Where the Example page walks through mq’s features, each Cookbook page starts from a real problem (“I want to do X”) and gets straight to a working query.

How a recipe is structured

Every recipe follows the same four parts:

  • Goal: the problem being solved, in one sentence.
  • Prerequisites: anything the input or environment needs (a module import, an mq flag, a document shape).
  • Query: the mq query or command to run.
  • Output: the result you should see.

Selecting and filtering content

Working with sections

Working with tables

Functions and data

Working with data formats

Parsing text formats and command output

Fetching over the network

Multi-file and LLM workflows

Looking for a full tour of mq’s selectors and built-in functions instead? See the Example page.