🏃♂️➡️📕 paulrun
What is paulrun?
paulrun runs hand-written markdown runbooks.
A runbook is a normal markdown file that a person can read and follow without paulrun. Mark a code block run, and paulrun runs it for you. Everything else stays documentation.
Example runbook
Save this as hello.md:
---
title: Say hello
inputs:
- name: NAME
description: Who to say hello to
---
# Say hello
A runbook is just markdown. paulrun runs the blocks marked `run`, shows the
`docstring` ones, and leaves everything else alone, like this paragraph.
## Greet
```docstring
Saying hello to <NAME>.
```
```sh run
echo "Hello, <NAME>!"
```
## Count the letters
```python run
import os
name = os.environ["NAME"]
print(f"{name} has {len(name)} letters")
```
Check it, then run it:
paulrun check hello.md
paulrun go hello.md
hello.md: ok
NAME (Who to say hello to): Paul
Say hello
inputs: NAME=Paul
1. Greet
2. Count the letters
2 run blocks
Start? [y/N] y
=== Greet ===
Saying hello to Paul.
echo "Hello, Paul!"
Hello, Paul!
exit 0 (0.0s)
=== Count the letters ===
import os
name = os.environ["NAME"]
print(f"{name} has {len(name)} letters")
Paul has 4 letters
exit 0 (0.1s)
finished: ok (0.1s)
check finds problems before anything runs. go asks for the inputs, shows you the plan, then runs each step in order, streaming every command's output as it goes. It stops at the first command that fails.
Why use paulrun?
Release steps get forgotten. Writing them down helps; making the written-down version run itself fixes it.
- It's just markdown - A runbook reads like documentation, renders on GitHub, and works fine without paulrun.
- Check before you run -
paulrun checkcatches undeclared placeholders, broken frontmatter and shell or Python syntax errors before anything runs. - See what would happen -
paulrun go --dryshows every command with its inputs filled in, and runs nothing. - Inputs and secrets - Ask for values once, check them against a pattern, and keep secrets off the screen and out of the log.
- Manual steps too -
confirmblocks pause for the things only a person can do. - A record of every run - An optional transcript keeps every command, its output and how the run finished.
- More than shell - Shell and Python blocks are built in, and other languages can be added as backends.
Install
paulrun is a command-line tool, so install it on its own rather than into a project:
uv tool install paulrun
Or with pip:
pip install paulrun
paulrun needs Python 3.12 or later and bash, and runs on macOS and Linux. Windows isn't supported. It's for runbooks you run yourself, at a terminal; there's no CI mode.
Getting started
👉 Read the full documentation for the runbook format, every command, and writing your own backend.
See examples/ for more runbooks, including a real release, and PUBLISHING.md for the runbook paulrun releases itself with.
Want to help? See CONTRIBUTING.md.
Metadata
Release files for paulrun 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| paulrun-0.1.0.tar.gz | 162.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| paulrun-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 188.7 kB
Release files / paulrun-0.1.0.tar.gz
| Download URL | paulrun-0.1.0.tar.gz |
|---|---|
| Size | 162.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5276f07aaa31d87ded88c405fcb7af6963812b3739bee0e9ec8caa982368ea0e
|
|
BLAKE2b-256 checksum How to use checksums |
11ffd6c6636b8e0fd481917a31b6756c3d3a0b9bdb9c1ca4e05360e77bd8c8da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / paulrun-0.1.0-py3-none-any.whl
| Download URL | paulrun-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04a705d4fff6f82f4e8311ec9ed8dbbecaa91f148a766290afa7fa9b61382648
|
|
BLAKE2b-256 checksum How to use checksums |
90a0dfd310f494cdf608c9bef3958f7f38bdc539171bab3308072956a81c67fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|