quarto-term 
Persistent interactive terminal sessions for Quarto
quarto-term is a Quarto extension that runs commands in a real, persistent shell session. State carries across cells, colors render faithfully, and you can drive fullscreen TUI apps, all from your .qmd file.
quarto-term is great for:
- Documentation and tutorials: CLI tools, shell concepts, installation guides, git workflows, and API exploration with real output and persistent state
- Technical books and courses: faithful terminal rendering for any “type this, see that” sequence, including TUI walkthroughs, database demos, and data pipeline chains
- DevOps and security: runbooks, CTF writeups, and environment setup guides where colored tool output and multi-step sessions matter
date
Thu Nov 5 09:22:46 PM UTC 2026
EXTENSION_NAME="quarto-term"
cowsay "Hello, I'm rendered using $EXTENSION_NAME"
_______________________________________
< Hello, I'm rendered using quarto-term >
---------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
htop
0[ 0.0%] Tasks: 42, 109 thr, 130 kthr; 1 runnin
1[| 0.7%] Load average: 0.58 0.53 0.23
2[| 0.7%] Uptime: 00:04:28
3[ 0.0%]
Mem[||||||||||| 963M/15.6G]
Swp[ 0K/3.00G]
[Main] [I/O]
PID USER PRI NI VIRT RES SHR S CPU%▽MEM% TIME+ Command
5142 runner 20 0 8384 4716 3724 R 0.7 0.0 0:00.03 htop
1 root 20 0 22836 14396 9876 S 0.0 0.1 0:02.93 /sbin/init
163 root 19 -1 83424 18228 16900 S 0.0 0.1 0:00.35 /usr/lib/syst
225 root RT 0 298M 43716 8768 S 0.0 0.3 0:00.03 /sbin/multipa
231 root 20 0 28928 8040 5212 S 0.0 0.0 0:00.21 /usr/lib/syst
238 root 20 0 298M 43716 8768 S 0.0 0.3 0:00.00 /sbin/multipa
239 root RT 0 298M 43716 8768 S 0.0 0.3 0:00.00 /sbin/multipa
240 root RT 0 298M 43716 8768 S 0.0 0.3 0:00.00 /sbin/multipa
241 root RT 0 298M 43716 8768 S 0.0 0.3 0:00.00 /sbin/multipa
242 root RT 0 298M 43716 8768 S 0.0 0.3 0:00.01 /sbin/multipa
243 root RT 0 298M 43716 8768 S 0.0 0.3 0:00.00 /sbin/multipa
394 root 20 0 3852 2900 1980 S 0.0 0.0 0:00.31 /usr/lib/linu
522 systemd-re 20 0 21484 13176 10952 S 0.0 0.1 0:00.16 /usr/lib/syst
F1Help F2Setup F3SearchF4FilterF5Tree F6SortByF7Nice -F8Nice +F9Kill F10Quit
All of the above was produced from a single .qmd file using quarto-term.
Why quarto-term?
Quarto’s built-in bash engine executes each code cell in an isolated subshell. That means:
- Variables,
cd, and other state don’t persist between cells. - You can’t show interactive TUI applications (htop, vim, nyancat).
- Output is plain text with no ANSI color support.
- There’s no way to send special keys (Ctrl-C, arrow keys).
- You can’t produce terminal recordings alongside your document.
quarto-term solves all of these by running a single persistent shell session that all cells share. It captures output using a real terminal emulator (including colors, cursor movement, and fullscreen apps), and can optionally produce asciicast or termshow recordings for playback.
Features
- Persistent sessions. State carries across cells (variables, working directory, shell history).
- ANSI color rendering. Faithfully renders colored output as HTML/LaTeX.
- Fullscreen capture. Capture TUI apps like htop, vim, or nyancat.
- Special keys. Send Ctrl-C, arrow keys, Enter, Escape, and more.
- Human typing simulation. Configurable speed and error rate for realistic recordings.
- Terminal recordings. Produce
.cast(asciicast v2) or.termshowfiles alongside your document. - Line options. Control timing, key behavior, and prompt expectations per line.
- Multi-line commands. Automatic PS2 continuation prompt detection.
- Styling. Built-in colorschemes with light/dark mode support, fonts, and sizing.
- Multiple output formats. HTML, LaTeX/PDF, and Markdown.
Quick install
quarto add jeroenjanssens/quarto-termOn first render, the correct binary for your platform is automatically downloaded from GitHub Releases and cached locally. Supported platforms: macOS (ARM and Intel), Linux (x86_64 and ARM), and Windows.
See Get Started for a complete walkthrough.