Lightweight markdown preview plugin for pi — renders assistant responses as styled HTML via cmux browser. Zero heavy dependencies (no puppeteer, no pandoc).
- Extracts markdown from the assistant's last response
- Converts to styled HTML with a built-in markdown→HTML converter
- Opens a cmux browser split, navigates to the HTML file
- Takes a screenshot → displays as an inline terminal image
- Closes the browser split automatically
- cmux — running inside a cmux terminal session
- pi ≥ 2.42
/install github:mastertyko/pi-cmux-preview
| Command | Description |
|---|---|
/preview |
Screenshot last assistant response in terminal |
/preview --pick |
Choose which assistant response to preview |
/preview --file <path> |
Preview a markdown file |
/preview --browser |
Open in cmux browser split (stays open) |
/preview-browser |
Alias for /preview --browser |
/preview-clear-cache |
Clear the render cache |
| pi-cmux-preview | omaclaren/pi-markdown-preview | |
|---|---|---|
| Browser engine | cmux (already running) | puppeteer-core (extra dep) |
| Markdown→HTML | Built-in converter | pandoc (external binary) |
| Math/LaTeX | Not yet | MathML + MathJax fallback |
| Mermaid diagrams | Not yet | Yes (via mmdc CLI) |
| PDF export | Not yet | Yes (via pandoc + xelatex) |
| Dependencies | 0 | puppeteer-core |
| External tools | None | pandoc, xelatex, mmdc |
MIT