Skip to main content

Turn what you just did in the terminal into a clean, re-runnable runbook — offline, no AI, your history never leaves your machine.

Project description

runscribe

Turn what you just did in the terminal into a clean, re-runnable runbook — offline, no AI, your history never leaves your machine.

Every team has tribal knowledge stuck in one person's head: how to deploy, how to restore a backup, how to rotate a key. Writing it down is tedious and it goes stale the moment the commands change. runscribe captures a real session as you work and mechanically turns it into a plain-Markdown SOP you can edit, share, and (soon) re-run.

  • 🔒 100% local. No account, no network, no telemetry. Nothing is ever uploaded — not to a server, not to an LLM.
  • 🤖 No AI. The runbook is produced deterministically from what actually ran. Same session in, same runbook out.
  • 📝 Plain Markdown out. Hand-editable, diff-able, and readable without runscribe installed.
  • 🧹 Secret-aware. Built-in redaction scrubs common tokens, keys, and credentials before they land in a shared doc.

Why not just use script/asciinema or an AI tool? Recorders give you an unsearchable replay, not an editable procedure. AI runbook generators send your shell activity to a model. runscribe gives you a clean, editable SOP and keeps everything on your machine.

Install

pip install runscribe      # the command is `runscribe`

Or grab a standalone binary (no Python required) from the Releases page — one file each for Linux, macOS, and Windows.

Use

1. Record — run your commands as normal:

runscribe record
● recording — commands run for real; # note, ## section, exit to finish.
runscribe:myproject$ ## Deploy the API
runscribe:myproject$ # Make sure you're on the release tag first
runscribe:myproject$ git checkout v1.4.2
runscribe:myproject$ ./deploy.sh staging
runscribe:myproject$ exit

2. Build — turn the session into a runbook:

runscribe build --last -o deploy.md
---
title: "Runbook — 20260706-141210"
created: "2026-07-06T14:12:10"
generated_by: runscribe
---

# Runbook — 20260706-141210

## Deploy the API

Make sure you're on the release tag first

<!-- runscribe: id=1 -->
```bash
git checkout v1.4.2
./deploy.sh staging

**3. Run** — replay a runbook step by step, later or on another machine:

```bash
runscribe run deploy.md
running 2 step(s) from deploy.md

## Deploy the API
$ git checkout v1.4.2
  run this step? [Y]es / [s]kip / [q]uit:

Each command is shown before it runs; you confirm (or --yes to run unattended). {{PLACEHOLDER}} tokens are filled in — prompted, or passed with --set NAME=value. A failing step halts the run (unless --keep-going), and on POSIX state persists across steps just like recording.

How it works

runscribe record records each command, its working directory, exit code, timing, and (bounded) output to an append-only JSONL file under .runscribe/sessions/. On POSIX it feeds commands to a single long-lived shell, so cd, export, and shell variables persist across steps just like a real session; on Windows (or with --subprocess) it runs each command independently. For the highest fidelity on POSIX — colored output and simple interactive TUIs — record with --pty, which attaches a real pseudo-terminal. runscribe build redacts secrets, drops navigation noise (ls, pwd, …), collapses immediately-repeated commands, and renders a Markdown runbook. Command steps are tagged with <!-- runscribe: id=N --> so runscribe run re-executes exactly those runnable steps — never prose or example-output blocks.

Custom redaction rules

Drop a .runscribe/redact.toml next to your sessions to extend the built-in scrubbing:

# Extra regexes to scrub (matched spans become <REDACTED>).
patterns = ["INTERNAL-[0-9]{6}", "acme-[a-z]+-key"]

# Exact strings to always scrub (no regex needed).
literals = ["project-bluebird", "10.0.0.42"]

runscribe build picks it up automatically (or point at one with --redact-config).

Roadmap

  • M1: record + build. Per-command capture, secret redaction, Markdown output. ✅
  • M2: persistent-shell capture (cd/export/vars persist), user-extensible .runscribe/redact.toml, smarter noise filtering. ✅
  • M3: runscribe run — step-by-step execution with confirmations, {{placeholders}}, and halt-on-failure. ✅
  • M4: HTML export ✅, standalone binaries for Linux/macOS/Windows ✅, and PTY capture on POSIX (--pty) ✅. Native-Windows PTY (ConPTY) is the remaining follow-up.

Security & limits

Redaction is conservative but not a guarantee. Always skim a generated runbook before sharing it — runscribe cannot know that an unusual internal token is a secret. Recorded sessions under .runscribe/ are git-ignored by default because their output may contain sensitive data.

License

MIT © 2026 Hamza Mansoor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runscribe-0.1.1.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runscribe-0.1.1-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file runscribe-0.1.1.tar.gz.

File metadata

  • Download URL: runscribe-0.1.1.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for runscribe-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1410e3c4bbfbe3649218489c4bc3405bd2fef1501c4702793e93f0d3990b4418
MD5 fa6b0a94c6bd0f4cadf788f3daf53147
BLAKE2b-256 21591a0c028304b987124d640ab3c7bf5e0c39b19dc3a2ede555989bbc78f648

See more details on using hashes here.

File details

Details for the file runscribe-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: runscribe-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for runscribe-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c707d5a91e9a08093b5cd14bd9bc5c686fd06951197294524e6717ac75e39b52
MD5 00c55dce809f21f185c3718d3f08f4b8
BLAKE2b-256 8987a544ce90897bd00f7ec403130bb1dc585c6647cd0cbcbb4002dda698780a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page