zoetrope README

The project's README from github.com/furkankly/zoetrope. As one markdown file: README.md.

zoetrope

Watch a Claude Code session as a live flow graph, in your terminal or your browser.

crates.io docs.rs downloads build status minimum supported Rust version

zoetrope.furkankly.dev · the whole app in your browser, the same binary compiled to WASM

A session drawn as a flow graph: a main agent above the subagents it spawned, over a timeline of tool activity

Claude Code writes a JSONL transcript for every session under ~/.claude/projects/. zoetrope reads it and draws the session as a graph in your terminal: the main agent, the subagents and workflows it spawns, and the tools each one runs, updating live as it goes. Point it at a finished run and it replays, paced by the session's own timestamps. Point it at a running one and it follows along. It's read-only, and nothing leaves your machine.

Built on ratatui and rataflow.

zoetrope replaying a Claude Code session as a flow graph

Installation

Homebrew — macOS and Linux:

brew install furkankly/tap/zoetrope

Cargo — needs a Rust toolchain:

cargo install zoetrope

Prebuilt binaries — no toolchain needed. Every release carries archives for macOS (Apple Silicon and Intel), Linux (musl, arm64 and x86_64) and Windows (x86_64). Unpack one and put zoe on your PATH.

Whichever route you take, the command is zoe. Or build from source:

git clone https://github.com/furkankly/zoetrope
cd zoetrope
cargo build --release
./target/release/zoe

No install at all: try it in your browser. Drop a transcript on the page and get the same graph.

Usage

zoe                          # follow the current project's live session
zoe <dir>                    # follow another project's session
zoe <file.jsonl>             # replay a recording from the start
zoe <file.jsonl> --follow    # open a recording at its live edge
zoe <file.jsonl> --speed N   # playback speed (default 8.0)
zoe inspect <file.jsonl>     # print the session tree and exit (no TUI)

Give it a file and it reads the whole transcript, then keeps watching for new lines. Give it a directory, or no argument at all, and it finds the newest session in that project and follows it live. Whichever way you start, the controls are the same: scrub, follow, pause, jump back to live.

The same engine also runs in the browser, compiled to WebAssembly via ratzilla. Open a session from disk, or drop a transcript on the page. It stays local there too.

Features

The graph

Time travel

Inspection

Reading your sessions

Keys

space play/pause · [ ] prev/next prompt · End or g jump to live · drag the bar to seek · ? for everything else.

Full keymap
Key Action
space play / pause (resumes from the playhead)
[ / ] previous / next prompt era
End / g jump to the live edge
s toggle gap compression (faithful pacing vs. skip idle stretches)
mouse drag seek along the scrubber
o / f camera: Overview / Follow
r relayout (tidy the graph)
arrows / Tab / Shift-Tab move between agents
h j k l pan the graph
+ / - / 0 zoom in / out / reset
c center on the selected agent
click open an agent's detail panel
j / k / PgUp / PgDn scroll the detail panel
i session info overlay
? help overlay
esc close an overlay / clear the selection
q / ctrl-c quit

j / k scroll the detail panel when an agent is selected, otherwise they pan the graph.

Hand the camera to the action with f and it glides to whichever agent just did something. This is what watching a live run looks like:

zoetrope in follow mode, the camera tracking whichever agent is working

Or drive it yourself: pan, zoom where you point, open an agent's panel, and drag the scrubber to travel back through the session.

Panning, zooming, opening a detail panel, and dragging the scrubber

Under the Hood

zoetrope treats the transcript as an append-only event log. It tails the files, parses each line defensively, and folds them into a derived model of agents, tool calls, and prompts. Nothing is mutated in place. The model is a pure function of the facts seen so far, so seeking backwards is exact.

A few of the pieces that turn a log into a watchable session:

The model, the timeline and the rendering all live in the portable core, a library with no IO that compiles for any target, including WebAssembly. The native frontend (the zoe binary in this crate) and the browser frontend (the zoetrope-web crate under web/wasm/, which runs the hosted app) sit on top of it and differ only in their IO and event loop.

See docs/DESIGN.md for the module map and the transcript format, and docs/ARCHITECTURE.md for the invariants above in full.

A note on the transcript format

The JSONL format zoetrope reads is undocumented and internal to Claude Code, so it can change without warning. zoetrope is built to degrade rather than break: unrecognized records are skipped, missing fields fall back, and a malformed line never takes down the session. If a new Claude Code release makes something render oddly, please open an issue.

Contributing

Pull requests are welcome.

License

MIT.

Acknowledgements

zoetrope (furkankly/zoetrope)

Searching Database…

这是什么?Zoetrope 把 Claude Code(或 Codex)编程智能体会话变成实时动态的流程图,展示主智能体、它的子智能体和工作流以及每一次工具调用,你可以在终端或浏览器中观看。
这是终端应用还是浏览器应用?两者都是:原生构建是用 ratatui 制作的终端 UI,同一个引擎也被编译为 WebAssembly,因此还能作为托管网页运行——你只需把 transcript 文件拖放到页面上,完全无需安装。
我怎么安装和运行它?macOS/Linux 上通过 Homebrew 安装,有 Rust 工具链的话可通过 Cargo 安装,或下载适用于 macOS(Apple Silicon 或 Intel)、Linux(musl,arm64/x86_64)或 Windows(x86_64)的预构建二进制;无论哪种方式,命令都是 `zoe`,指向一个 transcript 文件或项目目录。
使用它需要先配置好 Claude Code 吗?需要——zoetrope 只读取 Claude Code 在 ~/.claude/projects/ 下为每个会话写入的 JSONL transcript,所以你需要已经运行过(或正在运行)Claude Code 会话;它自身不需要 API 密钥或账号。
如果 Claude Code 更改了它的 transcript 格式会怎样?JSONL 格式没有文档且属于 Claude Code 的内部格式,可能毫无预警地变化;zoetrope 的设计是降级而非崩溃,会跳过无法识别的记录。
我的会话数据会离开我的机器吗?不会——zoetrope 是只读的且完全没有网络访问;它的依赖树中没有任何 HTTP 客户端,tokio 依赖也是在去掉其网络特性的情况下引入的,你可以用 cargo tree 自行验证。
实时图中的一个节点究竟能让我看到什么?每张卡片是一个智能体——主会话、子智能体,或嵌套着子项的工作流组——显示状态、当前工具、工具计数和输出 token 数,工具调用以下方小标签的形式出现,最终变为对勾或叉。
会话结束后我能回退并重放吗?可以。有一条可拖动的时间线,按事件而非墙上时钟索引,你可以向后跳转,看着智能体“退回未完成”状态、工具计数回落,完全还原那一刻会话的进度,还可选择压缩空档以跳过无操作的时段。
我能详细查看某个智能体究竟做了什么吗?点击任何智能体会打开它的溯源面板:生成它的提示词、它的模型、围绕它的推理,以及每次工具调用及其耗时;`zoe inspect` 可以无头导出整棵树,因此即使没有终端也能工作。
为什么要做图查看器,而不只是读原始日志?原始 transcript 是扁平的只追加事件日志,逐行阅读很难跟上;zoetrope 把它折叠成由智能体、工具调用和提示词组成的派生模型,让亲缘关系、时序和完成情况变成你能亲眼看着展开的东西。
Creator
furkankly
Size
11.6 MB
Stars
1.1K
Age
2mo
Commits · 90 Days