MIT open source  ·  pip install md2cast

Your docs,
alive .

Write Markdown. Every code block becomes a live terminal recording, browser walkthrough, or GUI demo— regenerated automatically on every push.

Star on GitHub See how it works
$ pip install md2cast
tutorial.md
tutorial.md
# Getting Started   Install the CLI tool:   <!-- exec --> ```bash pip install md2cast ```   Verify it works:   ```bash md2cast --version ```   ---   ## Configuration   Create a config file:   <!-- type-delay 0.04 --> <!-- exec --> ```bash my-tool init --template starter ```   > Your docs are now alive.          
tutorial.cast playing
asciinema player
How it works

Write Markdown.
Ship living docs.

No screencasting software. No retakes. No stale recordings. Your docs rebuild themselves.

01

Annotate your Markdown

Add HTML comment directives to code blocks. Or skip them entirely — sensible defaults handle most cases.

# My Setup Guide

Install the agent framework:

<!-- exec -->
```bash
pip install envpod
```

<!-- browser -->
<!-- navigate https://app.envpod.io -->
02

Run one command

md2cast executes real commands, captures terminal output, drives your browser via Playwright, and records everything.

$ md2cast docs/ --render-html

# or generate GIFs to embed in README
$ md2cast README.md --gif

# or publish to the web
$ md2cast docs/ --publish
03

Ship. Push. Repeat.

Get a static HTML docs site with embedded players. Wire to CI and every merge regenerates every recording automatically.

# .github/workflows/docs.yml
- run: md2cast docs/ --render-html

# screencasts always match
# your latest code. always.
Before & After

Same source.
Completely different experience.

Your Markdown doesn't change. md2cast transforms how readers experience every code block.

tutorial.md
tutorial.md
# Getting Started   Install the package from npm.   ```bash npm install my-awesome-tool ```   Verify it works:   ```bash my-tool --version ```   > Tip: Use --global for system-wide.
tutorial.cast • playing
asciinema player
Capture types

Terminal. Browser.
GUI. One file.

The only tool that generates animated walkthroughs across all three environments from a single Markdown source.

⌨️

Terminal

Executes real commands and records output. Type delays, custom prompts, syntax highlighting, multiple themes. 9 directives included free.

<!-- exec -->
<!-- type-delay 35 -->
```bash
envpod init --zero-trust
```
🌐

Browser Pro

Full Playwright integration. Navigate, click, type, screenshot — all described in Markdown comments. Outputs video or GIF of real browser interactions.

<!-- browser -->
<!-- navigate https://app.io -->
<!-- click #get-started -->
<!-- screenshot -->
🖥️

GUI Desktop Pro

Desktop automation via xdotool/ydotool. Capture real app interactions — window focus, mouse, forms — without recording manually.

<!-- gui -->
<!-- app envpod-desktop -->
<!-- click File > New Agent -->
<!-- screenshot -->
🔀
Mixed workflows Pro

Chain terminal → browser → GUI in one Markdown document. Document an entire user journey — install, configure, use the web dashboard, open the desktop app — with a single source of truth that rebuilds on every push.

Directives

You already know
the syntax.

HTML comments in your Markdown. Every directive is optional — remove them all and md2cast still works.

Directive What it does
<!-- exec -->Execute the command block for real and capture actual output
<!-- no-exec -->Skip execution, just type the block for demonstration
<!-- type-delay N -->Set typing speed in ms per character (default 35)
<!-- prompt "text" -->Override the terminal prompt for the next block
<!-- output "text" -->Inject a static output line after the command
<!-- view-exec -->Show the command being typed, then execute for real output
<!-- clear -->Clear the terminal screen at this point
<!-- skip -->Exclude this block from the screencast entirely
<!-- pause N -->Hold on the current frame for N seconds
<!-- browser -->Switch to Playwright browser capture mode (Pro)
<!-- gui -->Switch to desktop GUI capture mode (Pro)

CLI flags

Flag What it does
--gifAlso generate a GIF via agg
--executeRun all bash blocks and capture real output
--renderGenerate Markdown with GIFs embedded above each code block
--render-htmlGenerate HTML page with interactive asciinema players
--embedSelf-contained HTML — cast data inline, no external files
--splitOne .cast per ## section
--section NRender only section N
--listList all sections in the document
--cols NTerminal width (default: 110)
--rows NTerminal height (auto-sized to content)
--theme FILECustom theme JSON for colors, timing, player settings
--init-themePrint a default theme JSON to stdout
-o FILECustom output path
-C DIRWorking directory for executed commands
Features

Everything you need.
Nothing you don't.

▶️

Real execution

Run bash commands for real and record actual output. No fake screenshots, no manually crafted responses. What you see is what runs.

🎨

Themes & syntax highlighting

Custom colors, fonts, and terminal sizes via JSON config. Python, YAML, JSON, and more auto-highlighted with Pygments. Any Pygments theme.

📄

HTML docs generation

--render-html builds a complete static docs site with embedded asciinema players, syntax highlighting, and responsive layout. Zero server needed.

✂️

Split mode

--split generates one .cast per section. Perfect for multi-step tutorials where you want individual playback per chapter.

🖼️

GIF & video export

--gif converts any cast to an embeddable GIF. Video-to-GIF via ffmpeg included in Pro. Drop recordings into READMEs, Notion, anywhere.

🔁

Always current

Wire md2cast to your CI. Every merge rebuilds every recording with real output from your latest code. Docs never go stale again.

Use cases

Built for people
who ship.

🤖

AI agent frameworks

Show your agent running end-to-end. Every framework needs "watch it work" moments. md2cast makes them automatic.

🛠️

OSS maintainers

Stop losing users at the README. Turn your install guide into a live demo. Same source you already maintain.

🚀

DevRel teams

Replace Loom recordings that go stale. Your demo regenerates on every release. Ship once, maintain never.

🔬

Scientific tools

Reproducible workflows with visual proof. Pipelines, ML experiments — documented and verifiable.

💼

Sales engineering

Product walkthroughs always accurate. Browser and GUI capture means your demo matches the latest version.

📚

Developer education

Tutorials that run themselves. Every code example is a live recording. Learners see exactly what happens.

Comparison

Everyone does docs
or screencasts.

md2cast is the only tool that connects both from a single Markdown source with automatic rebuild.

Tool Writes docs Animated code Browser capture Auto-rebuild Single source
GitBook
Mintlify
ReadMe
VHS
Asciinema
Loom / Arcade
md2cast
Pricing

Start free.
Go Pro when ready.

Free tier is genuinely useful — not a stripped-down teaser. Pro unlocks browser, GUI, and unlimited scale.

Free
$0
MIT licensed · forever
  • All 9 terminal directives
  • Real command execution
  • --gif, --render, --render-html
  • Themes & syntax highlighting
  • Up to 15 code blocks
  • Up to 10 sections (--split)
  • Small md2cast watermark on GIFs
  • Browser capture (Playwright)
  • GUI & desktop automation
  • Mixed workflows
Get started free →
Pro
$12
per month · cancel anytime
  • Everything in Free
  • Unlimited code blocks
  • Unlimited sections
  • No watermark on GIFs
  • Browser capture (Playwright)
  • GUI desktop automation
  • Mixed CLI → browser → GUI
  • Video-to-GIF (ffmpeg)
  • AI enhance (coming soon)
Coming Soon
Team
$25
per user / month
  • Everything in Pro
  • Shared theme library
  • CI/CD integration (GitHub Action)
  • Private cast hosting
  • VS Code extension
  • SSO and team management
Contact Sales →

One command.
Living docs.

Install in 30 seconds. Your first screencast in under 2 minutes.

$ pip install md2cast
View on GitHub ↗ See Pro features