README
ΒΆ
ποΈ aeye
A terminal image carousel for coding agents β browse every screenshot, render, and image your agent touches, without leaving the terminal.
aeye = "agent eye" β every agent needs aeye.
https://github.com/user-attachments/assets/56da40a2-29c7-4e88-b618-91a703a4c325
A big preview of the selected image plus a filmstrip of thumbnails, rendered in a tmux split or kitty window (dual-mode). One half captures every image a coding-agent session touches (reads, writes, screenshots); the other renders them and auto-refreshes as new ones arrive β so you can glance at what your agent is doing without leaving the terminal.
Features
- πΌοΈ Preview + filmstrip β a large view of the selected image above a scrollable strip of thumbnails.
- πͺ Auto-capture β a PostToolUse hook records every image the session reads, writes, or screenshots into a per-pane manifest. Nothing to do by hand.
- π Multi-host rendering β a tmux split, a kitty/wezterm split, or a ghostty window, auto-detected from the host. Opens beside your agent, not wherever you happened to navigate. See Terminal support.
- β‘ Live β opens on the newest image and follows new captures as they stream in, until you take over with the keyboard; polls for changes every ~1.5s.
- β¨ Crisp β kitty graphics protocol on kitty/ghostty, with a
chafablock-art fallback everywhere else. - π§Ή Robust β skips deleted or corrupt entries instead of rendering blank cells; logs why, for when you wonder where an image went.
- π Diagrams (optional) β the agent can draw D2 diagrams that render straight into the carousel as sharp, zoomable vectors, with group-by-group drill-down and labels that auto-contrast against their fill.
Install
Two PATH entrypoints β the aeye viewer and the tmux-claude-images
toggle that opens it. Install both (the toggle launches the viewer into a
fresh pane, which resolves aeye from that pane's PATH).
Prebuilt binaries β no toolchain, Linux/macOS Β· amd64/arm64. Downloads both entrypoints:
os=$(uname -s | tr '[:upper:]' '[:lower:]'); arch=$(uname -m)
case $arch in x86_64) arch=amd64 ;; aarch64|arm64) arch=arm64 ;; esac
mkdir -p ~/.local/bin # ensure this is on your PATH
curl -fsSL "https://github.com/noamsto/aeye/releases/latest/download/aeye_${os}_${arch}.tar.gz" \
| tar -xz -C ~/.local/bin aeye tmux-claude-images
(Or download an archive from the releases page and extract both onto your PATH.)
Nix:
nix profile install github:noamsto/aeye # viewer
nix profile install github:noamsto/aeye#toggle # toggle
Go β viewer only; pair it with the toggle from the release archive or
scripts/tmux-claude-images.sh:
go install github.com/noamsto/aeye@latest
Then install the capture half for your coding agent.
Claude Code (run inside Claude Code, not the shell):
/plugin marketplace add noamsto/aeye
/plugin install aeye@aeye
Codex CLI (run in a shell; the marketplace root is adapters/codex/, not
the repo root):
codex plugin marketplace add <path-to-aeye>/adapters/codex
codex plugin add aeye@aeye
Codex skips a plugin's hooks until you review and trust them: run /hooks
inside Codex once after installing, and again after any plugin update (trust
is keyed to the hooks' hash).
Cursor Agent (hooks register through hookyard; the
manifest is adapters/cursor/hookyard.json). On Nix, import
aeye.homeModules.default next to hookyard's module. Otherwise render the
manifest and install it with the hookyard release binary:
sed "s|/ADAPTER_DIR|<path-to-aeye>/adapters/cursor|" <path-to-aeye>/adapters/cursor/hookyard.json > ~/.config/aeye-cursor-hookyard.json
hookyard install --manifest ~/.config/aeye-cursor-hookyard.json
Pass every manifest on the machine to the one hookyard install (repeat
--manifest): a separate run strips the previous run's rows.
Upgrading from install.sh, trust and skills: see
adapters/cursor/README.md.
pi (run in a shell; the package root is adapters/pi/, not the repo root):
pi install <path-to-aeye>/adapters/pi
The package registers aeye's hookyard handlers (capture + diagram rendering +
session guidance) and the image-gallery / diagrams skills. Open the
carousel with /aeye inside pi or tmux-claude-images from the shell.
π Step-by-step, agent-friendly guide:
docs/INSTALL.mdβ host check, both entrypoints, plugin, optional deps, and a smoke test, each with a verification command.
Via lazytmux (Nix / Home Manager)
lazytmux consumes this repo as a flake
input β it puts the viewer and tmux-claude-images on PATH and binds
prefix + I. If you run lazytmux you already have the carousel; just add the
plugin above for capture.
Usage
Ask your agent to show the images from this conversation (or invoke the
image-gallery skill), or open it yourself:
tmux-claude-images # toggle: run again to close. In tmux, also prefix + I (lazytmux)
It does nothing until images have been captured β the manifest fills as the session reads/writes/screenshots images.
Keybindings
| Key | Action |
|---|---|
β β β β / h l k j |
Move selection β while zoomed in or fill-framed, pan on an axis with overflow; keys on an axis with nothing to pan switch images |
n / p |
Page the filmstrip |
g / G (or Home / End) |
First / last image |
1β9 |
Jump to the Nth image |
z + = / Z - _ |
Zoom in / out |
f |
Toggle fill β full framing |
Enter / o |
Open in the default app |
O |
Open the containing folder |
y |
Copy the selected image to the clipboard |
d |
Drag the selected image out β in kitty just drag it with the mouse; d opens a ripdrag/dragon window elsewhere, else copies to the clipboard |
x |
Delete the selected image β marks it for deletion with a 5s undo window; press u to undo, or it's removed from disk when the countdown ends |
s |
Toggle the carousel between a side and bottom split (tmux only; no-op when the carousel is a floating pane) |
L |
Toggle the image's legend: a diagram's <image stem>.legend.svg sidecar, drawn over the preview's bottom-right corner (kitty only). It follows the image's light/dark variant β foo-dark.legend.svg before the shared foo.legend.svg β and never changes the image's zoom or pan. An image with no sidecar shows a "No legend" hint |
r |
Reload the manifest |
q / Ctrl-C |
Quit |
When zoomed in or fill-framed (f), the arrows/hjkl pan the preview on an
axis that has overflow. An axis whose crop already spans the whole image β a
thin, tall diagram or a short, wide one β has nothing to pan there, so that
axis's keys fall back to switching images, exactly like n/p (the current
crop is saved and the target's remembered one restored). Each image's zoom and
pan is remembered for the session β 0/Esc or zooming out to fit clears it,
and an image whose file changed (modification time or pixel dimensions) opens at
fit. A diagram's zoom and pan survives a light/dark theme switch and edits to its
.d2 source (the same share of the diagram stays framed, clamped to the new
render's size); it opens at fit only after 0/Esc or once the diagram is
removed.
While zoomed, the selected filmstrip thumbnail marks the visible region with an
outlined rectangle (kitty-protocol, sixel and iTerm terminals; the chafa-symbols
fallback skips it, since its thumbnails are only a few cells wide).
Diagrams (D2)
Diagrams render as sharp vectors and gain a few extra keys for exploring their structure β group by group β when one is selected:
| Key | Action |
|---|---|
Tab / Shift+Tab |
Cycle through regions/groups (Shift+Tab from the first backs out to the whole diagram) |
] / [ |
Drill into / out of the focused region |
0 / Esc |
Reset zoom and return to the whole diagram |
Diagrams with animated edges (D2 style.animated: true) loop in the kitty
carousel, with or without kitty-pane mode. Inside tmux this needs
allow-passthrough on, the same passthrough the carousel already uses to reach
kitty. AEYE_ANIMATE=0 keeps them static; AEYE_ANIMATE=full sends whole
frames instead of changed rectangles. They also play through a remote tmux
bridge or mirror, with frames sent zlib-compressed, and stay static if a frame
file would exceed the bridge's 8 MiB fetch cap.
The same loop plays SVG files with standard animation. Supported subset: SMIL
<animate>, <animateTransform> (translate, scale, rotate) and <set>, and
CSS @keyframes driven by animation (shorthand or longhands) on tag, .class
or #id selectors and inline style. The loop is the LCM of the animation
durations, capped at 12 s (beyond the cap it is the longest duration and
shorter animations jump at the wrap). aeye-* hooks and D2 edges complete one
cycle per loop at a fixed 100 ms per frame. Only standard animations scale the
frame gap: it is their loop length divided by the frame count (at most 1.5 s),
so a 2 s animation plays at about 167 ms per frame and a box big enough to cut
the frame count below 12 stretches the gap to keep the loop length.
Anything unsupported (<animateMotion>, spline or paced timing, other
selectors) stays at its static first state, as does a pathological file (over
4 MiB, over 256 animations, over 64 KiB of CSS, malformed XML).
Animations loop forever by default. To play a fixed number of times, add a CSS
class to any element of the SVG (in D2, class: aeye-once on a shape or edge;
in hand-written SVG, class="aeye-once"): aeye-once plays the animation once
and aeye-loops-N plays it N times (N from 1, clamped to 1000; aeye-loops-0
or an unparsable N means infinite). Kitty holds the final frame after the last
loop. It only affects an SVG that animates, and a re-attach (resize, focus or
window switch, theme switch, republish) replays the loops.
Republishing a diagram under the same name while it is open keeps its current zoom and keeps the old loop running until the replacement is ready, so the update swaps in without a flash back to fit or a static frame.
Rendering a diagram without the carousel
aeye render runs the same D2 pipeline as a standalone renderer, with no
browser involved. It takes a D2 or Mermaid diagram (Mermaid is converted
through mermaid2d2) and writes an SVG
or, for any other extension, a PNG:
aeye render diagram.d2 diagram.png
aeye render --from mermaid - flow.svg < flow.mmd
Mermaid chart types with no D2 equivalent (pie, gantt, journey, xychart, gitGraph) exit non-zero without writing the output, so a caller can fall back to another renderer.
Terminal support
Two things vary by host: where the viewer opens, and how sharp the images
are. Crisp rendering needs the kitty graphics protocol's unicode placeholders
(U+10EEEE); everything else uses the chafa
block-art fallback.
| Host (no tmux) | Window placement | Image quality |
|---|---|---|
| kitty | split beside the agent (kitty @ launch) |
crisp |
| ghostty | separate window (ghostty +new-window / open -na) |
crisp |
| wezterm | split beside the agent (wezterm cli split-pane) |
chafa* |
| Alacritty / Warp / other | β (use tmux) | chafa |
Inside tmux the viewer always opens as a split, on any host β except, per
AEYE_FLOAT (below), in a tmux-og crew grid window (window option
@crew_grid=1) on a tmux server whose new-pane supports floats, where it
opens as a floating pane over the grid (right float ~50%x90%, bottom float
~90%x50%, grown on small windows to keep ~80x24) so the grid layout is
untouched. WezTerm speaks
the kitty protocol but not its unicode placeholders (wezterm#986),
so it uses chafa today and would upgrade automatically if that lands.
* Crisp real-pixel rendering on wezterm/iTerm2 (sixel / OSC 1337) is tracked separately.
Drag-out. In kitty β₯ 0.47 (outside tmux) you drag the selected image
straight out of the preview with the mouse β a thumbnail follows the cursor β
using kitty's OSC 72 protocol;
no key needed. Everywhere else, the d key opens a small drag window via
ripdrag or
dragon if one is on PATH (Linux/X11/Wayland),
and otherwise copies the image to the clipboard.
AEYE_SPLIT controls where the viewer opens its split, on any backend: auto
(default) splits along the window's longer axis, side forces a left/right
split, bottom forces a top/bottom split. In tmux, press s in the viewer to
toggle it live.
AEYE_FLOAT controls when tmux opens the viewer as a floating pane instead of
a split: grid (default) floats only in a tmux-og crew grid window
(@crew_grid=1); always floats in any tmux window, as long as the server's
new-pane supports floats; never always splits.
Lifecycle. When the launcher can resolve the agent that opened the carousel
(inside tmux, by walking the launcher's process ancestry to the pane's shell) it
forwards that pid as AEYE_OWNER_PID; the viewer watches it and exits β which
then closes its split or window β as soon as the agent does, including on a
crash, kill-window, or terminal close that agent end-hooks miss. A carousel
opened by hand, or launched over the remote bridge (where the viewer can run on
a different host), gets no pid and behaves exactly as before.
Surviving a tmux server restore. The manifest key carries the tmux server pid and pane id, both of which change when a session manager such as tmux-remux restarts the server and replays the layout. aeye re-finds the images through the agent session id instead, and needs no tmux-remux configuration:
- When the viewer opens with a known session, the launcher sets the viewer
pane's
@remux_relaunchoption to<tmux-claude-images> --attach <session> --bin <aeye> --dir <state dir>and@remux_relaunch_pinnedto1. Without tmux-remux the options are inert. Nothing is stamped outside tmux or without a session id. A normal viewer exit clears both, and so does the agent exiting first; closing the pane drops them with it. - On restore,
--attachwaits (up toAEYE_ATTACH_WAITseconds, default 60) for the restored agent to write a manifest on the new server, then runs the viewer on it and stamps the new pane again, so a second restore works too. If none appears it falls back to the freshest manifest the session left under an old key; the agent-exit watch is off for that fallback, and a toggle may then open a second viewer. - A resumed agent pane (same session id) with no manifest copies the previous one for that session, unless that agent is still running; the old key is left to the 7-day TTL so an attached viewer keeps its images.
- Manifests of a dead tmux server are kept until the 7-day TTL instead of being swept at once, so a restore can claim them.
Enable kitty-pane mode (native drag-out inside tmux)
Native drag-out needs a real kitty pane β tmux can't carry the protocol. To make the viewer open as a kitty split instead of a tmux split while you work in tmux:
- kitty β allow remote control on a stable socket (
kitty.conf):allow_remote_control yes listen_on unix:/tmp/kitty-{kitty_pid} - tmux β let panes see kitty's socket and the mode flag (
tmux.conf):set -ga update-environment "KITTY_LISTEN_ON AEYE_HOST" - Opt in β
export AEYE_HOST=kitty.
If the socket isn't reachable, aeye falls back to a tmux split (drag-out then
uses ripdrag/dragon or the clipboard).
Seamless Ctrl-hjkl. Once kitty-pane mode is on, the carousel viewer crosses
back into tmux on Ctrl-h/j/k/l itself (via kitty @ action neighboring_window)
β no kitty config needed. For the tmuxβcarousel direction, your tmux nav bindings
must hand off to kitty at the pane edge. lazytmux ships this; for a hand-rolled
tmux.conf, route Ctrl-hjkl through a helper that, at the edge with
KITTY_LISTEN_ON set, runs kitty @ action neighboring_window <dir> instead of
select-pane (see lazytmux scripts/tmux-smart-nav.sh).
Debugging the carousel
Set AEYE_DEBUG to trace the viewer's first-frame lifecycle (issue #125-class
glitches):
AEYE_DEBUG=1(ortrue/on) β writes<state-dir>/<key>.trace.log(beside the manifest), fresh on each open.AEYE_DEBUG=/path/to/fileβ writes there. This truncates (overwrites) the file on each open, so don't point it at a file you want to keep.
To leave it on, set it where the launcher runs:
- tmux keybinding:
tmux set-environment -g AEYE_DEBUG 1 /aeyeskill / auto-open hook: export it in your shell profile.
The launcher forwards it into the spawned viewer on every host (tmux/kitty/wezterm/ghostty/iterm) when set.
Render limits
Every resvg rasterization (render-diagram, aeye render, the carousel's sharp
vector render and animated frames) runs under a memory bound (default 2048 MiB) and
a 60 s timeout. Both apply per resvg process, and at most four run at once, so
aeye as a whole stays under four times the bound. A diagram that exceeds either fails with diagram too large to render; the carousel keeps its static fallback. Output size is capped separately at
8192 px per side.
AEYE_RESVG_MEM_MB=<MiB>β overrides the memory bound for an unusual diagram (positive integer; empty or invalid values are ignored).
How the bound is enforced depends on the OS:
- Linux: hard virtual-address-space cap (
RLIMIT_AS, viaulimit -v). - macOS and other Unix: resident-memory ceiling polled every 50 ms (
RLIMIT_ASisn't enforced there), plus the timeout. - Windows: timeout only.
Architecture
The viewer is agent-agnostic. It renders a per-pane manifest and has no knowledge of which agent produced it β the manifest JSONL is the stable interface. Each agent gets a small capture adapter that appends to the manifest; the viewer never changes.
- Viewer (Go binary) β reads
${AEYE_DIR:-${CLAUDE_STATUS_DIR:-/tmp/claude-status}}/images/<key>.jsonl(<key>is<tmux server pid>-<pane>inside tmux, else the session id) and renders via the kitty graphics protocol (or chafa fallback). - Adapters (
adapters/) β per-agent capture, at parity:claude-code/,codex/,cursor/, andpi/(each a PostToolUse/SessionStart hook β or, for pi, hookyard handlers β plus skills).
Extracted from lazytmux, which consumes this repo as a flake input.
Status
Live standalone repo β the viewer binary, the Claude Code, Codex, Cursor, and pi capture adapters, and plugin skills all build and are consumed by lazytmux as a flake input. Zoom/pan and D2 diagram navigation are implemented; see docs/2026-06-10-design.md for the design notes.
Source Files
ΒΆ
- anim_encode.go
- animate.go
- cellsize.go
- clipboard.go
- contrast.go
- dragout.go
- dragout_native.go
- flock_fd.go
- gallery.go
- gallery_anim.go
- gallery_cache.go
- gallery_decode.go
- gallery_legend.go
- gallery_minimap.go
- gallery_mouse.go
- gallery_path.go
- gallery_raster.go
- gallery_regions.go
- gallery_render.go
- gallery_split.go
- gallery_vector.go
- gallery_warm.go
- gallery_zoom.go
- main.go
- ownerwatch.go
- ownerwatch_linux.go
- ownerwatch_poll.go
- ownerwatch_start_linux.go
- palette.go
- publish_diagram.go
- render.go
- render_diagram.go
- resvg_run.go
- smil.go
- smil_anim.go
- smil_css.go
- trace.go
- update_hint.go