01

Installation

One command, no account required.

$ curl -sSf https://mustr.sh/install | sh

Or download a binary directly from the releases page and place it on your PATH. Verify the install:

$ mustr --version
mustr 0.9.2
02

Runbook syntax

A runbook is a markdown file. Frontmatter carries metadata, each ## heading is a step, and annotation lines right below a heading configure how that step executes.

Frontmatter fields

titleHuman-readable name shown in mustr list.severityFree-form label (low / high / etc.) surfaced in the audit log.requires.envEnvironment this runbook is allowed to target — mustr refuses to run it elsewhere.

Step annotations

checkA shell expression that must succeed before the step runs. Failing checks halt the run.destructiveWhen true, the step is treated as irreversible and gated behind confirmation.confirmCustom message shown at the confirmation prompt for a destructive step.

Variable templating

{{ variable }} placeholders are resolved against the target environment's variable file (environments/production.yml, for example) at run time — the same runbook works across staging and production without editing it.

runbooks/db-failover.md
---
title: Failover primary database
severity: high
requires:
  env: production
---

## 1. Confirm replica lag

check: pg_replica_lag_seconds < 5

## 2. Promote replica to primary

destructive: true
confirm: "This will promote {{ replica_host }} to primary and cannot be undone. Continue?"

```sh
pg_ctlcluster promote {{ replica_host }}
```
03

CLI reference

mustr run <file>

Executes a runbook step by step. Prompts for confirmation on any destructive step and writes a full audit record when the run finishes.

mustr validate <file>

Lints a runbook's frontmatter and step annotations without executing anything. Run this in CI on every PR that touches runbooks/.

mustr list

Lists every runbook discovered in the current repo, with title, severity, and target environment.

mustr init

Scaffolds a runbooks/ directory and a starter runbook in the current repo.

04

Quickstart

1. Scaffold a runbook
$ mustr init
created runbooks/example.md
2. Edit the steps

Open runbooks/example.md and replace the placeholder steps with your actual commands. Mark anything irreversible with destructive: true and a confirm message.

3. Validate before committing
$ mustr validate runbooks/example.md
 valid — 3 steps, 1 destructive
4. Open a PR, get it reviewed, merge

Same review process as any other code change — no separate wiki permissions to manage.

5. Run it
$ mustr run runbooks/example.md
 run complete — logged to audit trail (run #1)