ob-tmux is :results silent. These extensions fix that.
Issue #6 has been open for six years: you C-c C-c a tmux block, the command runs, but nothing comes back to your org file. This repo adds output capture, asciinema recording, and live streaming to ob-tmux blocks.
Each .org file is both an executable demo and a publishable post (via ox-ghost).
- ob-tmux-capture — Getting results back. Marker-based capture, pane snapshots, output filtering, and an agent-pair demo showing two Claudes talking via tmux.
- ob-tmux-asciinema — Streaming and recording. Live terminal sessions, cast files,
#+BEGIN_ASCIINEMAembeds. (coming soon) - ob-tmux-live — Live literate programming. Stream-to-post workflow. (coming soon)
| Package | File | Purpose |
|---|---|---|
ob-tmux-capture | ob-tmux-capture.el | Capture tmux pane output (markers, pane snapshot) |
ob-tmux-asciinema | ob-tmux-asciinema.el | Asciinema recording, streaming, metadata |
The .el files are standalone packages. The .org files demonstrate and document them — they don’t tangle/generate the elisp.
Add to ~/.config/doom/packages.el:
(package! ob-tmux)
(package! ob-tmux-capture
:recipe (:host github :repo "ii/ob-tmux-extensions"
:files ("ob-tmux-capture.el")))
(package! ob-tmux-asciinema
:recipe (:host github :repo "ii/ob-tmux-extensions"
:files ("ob-tmux-asciinema.el")))Add to ~/.config/doom/config.el:
(use-package! ob-tmux-capture
:after ob-tmux
:config
(ob-tmux-capture-enable-advice))
(use-package! ob-tmux-asciinema
:after ob-tmux-capture
:config
(setq ob-tmux-asciinema-server-url "https://asciinema.mcclimans.net"))Then: ~/.config/emacs/bin/doom sync
(use-package ob-tmux-capture
:straight (:host github :repo "ii/ob-tmux-extensions"
:files ("ob-tmux-capture.el"))
:after ob-tmux
:config
(ob-tmux-capture-enable-advice))
(use-package ob-tmux-asciinema
:straight (:host github :repo "ii/ob-tmux-extensions"
:files ("ob-tmux-asciinema.el"))
:after ob-tmux-capture)(add-to-list 'load-path "~/src/ob-tmux-extensions")
(require 'ob-tmux-capture)
(require 'ob-tmux-asciinema)
(ob-tmux-capture-enable-advice)tmux has-session -t demo 2>/dev/null || tmux new-session -d -s demo -n main#+begin_src tmux :session demo:main :capture markers
kubectl get pods
#+end_src
#+begin_src tmux :session demo:main :capture pane
#+end_src
#+begin_src tmux :session demo:main :capture asciinema :log yes
echo "Recording this!"
#+end_src
| Argument | Values | Default | Description |
|---|---|---|---|
:capture | pane, markers, asciinema | markers | Capture method |
:timeout | seconds | 30 | Max wait time |
:lines | N or -N | none | First/last N lines of output |
:grep | regex | none | Filter output lines |
:raw | yes / no | no | Keep prompts and echoes |
:scrollback | lines | visible | Pane history depth |
:log | yes / no | no | CAST_LOG drawer (asciinema) |
:stream-to | stream-id | none | Remote streaming (asciinema) |
:keep-cast | yes / no | no | Retain local cast file |
:idle-limit | seconds | 2 | Max idle in recording |
Check that advice is enabled:
(princ (if (advice-member-p 'ob-tmux-capture-advice-execute 'org-babel-execute:tmux)
"Advice enabled"
"Advice NOT enabled - run (ob-tmux-capture-enable-advice)"))~/.config/emacs/bin/doom doctorRebuild: M-x straight-rebuild-package RET ob-tmux-capture
Built by ii.coop, solving ahendriksen/ob-tmux#6.
Based on ob-tmux by Allard Hendriksen.