mq-task
mq-task is a task runner that executes code blocks in Markdown files, selected by section title. Your tasks.md or README.md (or any Markdown file) is the task file: the documentation and the automation are the same text.
It is built on mq, a jq-like tool for Markdown, which parses the document and extracts sections.
## build
```bash
cargo build --release
```
## ci
```meta
depends = ["lint", "test", "build"]
parallel = true
```
```bash
echo "all checks passed"
```
mq-task ci
Features
- Run code blocks from any section, in any language with a configured runtime
- Task dependencies, with parallel fan-out / fan-in and calls with arguments
- Loops (
forover lists, globs, matrices and another task's output) anddefercleanup - Conditions (
if), retries, timeouts,ignore_error,promptconfirmation, and output passing between tasks - Shared variables, fixed or computed by a command (
vars) - Import tasks from other Markdown files
- Skip up-to-date tasks (
sources/outputs/status) and--watchmode - Dependency graph (text and Mermaid) and shell completions
- Finds
tasks.md(orREADME.md) from any subdirectory; completes task names; suggests fixes for typos inmetaand task names mq-task checkvalidates the task file (unknown keys, missing dependencies, cycles, missing runtimes)- Scripting and CI options:
--summary,list --json,--output group,--yes - Interactive TUI with search, argument prompts and live progress
Warning
mq-taskis under active development.
Head to Getting Started to install it and run your first task.