agent-log-gif
Turn your Claude Code and Codex sessions into animated terminal-style replay GIFs or videos. Share them on Reddit, Slack, etc.
With apologies to Summer Yue.
Less fun but more usefully: use agent session videos to do retrospective reviews; include cool Claude demos in slide decks.
Supports Claude Code and Codex sessions out of the box.
Windows UI + Codex example
Quick start
Try it in the browser with the magic of WASM.
Run the CLI:
uvx agent-log-gif
Or pick a specific session from disk:
uvx agent-log-gif json ~/.claude/projects/<project>/<session>.jsonl
Help on all options:
uvx agent-log-gif json --help
To install permanently:
uv tool install agent-log-gif
Or to install as a Skill you can ask your agent to use for you:
npx skills add ysamlan/agent-log-gif
Claude/Codex skill
agent-log-gif includes an agent-log-gif Skill that lets Claude Code / Codex find your sessions and generate animations for you conversationally. Copy the skills/agent-log-gif folder it into ~/.claude/skills/, or install automatically via skills.sh:
npx skills add ysamlan/agent-log-gif
Then ask Claude things like "make a gif of my last coding session" or "find the session where I worked on auth and make an mp4 showing tool calls," or run /agent-log-gif inside Claude Code ($agent-log-gif in Codex).
Optional tools
For MP4/AVIF output, install ffmpeg using your system package manager (brew install ffmpeg, choco install ffmpeg, apt install ffmpeg, etc.).
For AVIF, your ffmpeg build must include an AV1 encoder. agent-log-gif prefers libsvtav1 and falls back to libaom-av1.
ffmpeg -encoders | rg 'av1|svt|aom'
Optimized GIFs
GIF optimization is done automatically via gifsicle using gifsicle-bin. Very large GIFs will skip automatic optimization to avoid hanging/crashing gifsicle.
Usage
Convert a session file
# GIF (default)
agent-log-gif json session.jsonl
# Animated AVIF
agent-log-gif json session.jsonl --format avif
# MP4 with (optional) background music
agent-log-gif json session.jsonl --format mp4 --music track.mp3 --loop-music
# Specify output file
agent-log-gif local -o out.gif
Pick from local sessions
agent-log-gif # interactive picker, opens result
Turn selection
Sessions default to 20 turns max. Adjust with --turns:
agent-log-gif json session.jsonl --turns 5 # first 5 turns
agent-log-gif json session.jsonl --turns 3,8 # turns 3 through 8
Music (MP4 only)
agent-log-gif json session.jsonl -o demo.mp4 --format mp4 --music track.mp3
agent-log-gif json session.jsonl -o demo.mp4 --format mp4 --music track.mp3 --loop-music
Window chrome
Default is macOS-26-like with rounded corners and traffic-light buttons. Choose a different style:
agent-log-gif json session.jsonl --chrome none # no window frame
agent-log-gif json session.jsonl --chrome mac # macOS, rounded corners (default)
agent-log-gif json session.jsonl --chrome mac-square # macOS, square corners
agent-log-gif json session.jsonl --chrome windows # Windows 11
agent-log-gif json session.jsonl --chrome linux # GNOME/Ubuntu
For dark terminal themes embedded on a light page, you can set the outer canvas color behind the rounded macOS corners:
agent-log-gif json session.jsonl --chrome mac --canvas-bg "#FFFFFF"
Color scheme
480+ terminal color schemes bundled from iTerm2-Color-Schemes. Default is Dracula.
agent-log-gif json session.jsonl --color-scheme "Catppuccin Mocha"
Custom font
Default is DejaVu Sans Mono (bundled). Override with any TTF:
agent-log-gif json session.jsonl --font /path/to/MyFont.ttf
Supported session formats
- Claude Code JSONL files (
~/.claude/projects/) - Codex JSONL session files (
~/.codex/sessions/) - URLs to any of the above
Web sessions
[!WARNING] The
webcommands are broken right now due to changes to the unofficial and undocumented APIs that these commands were using. See this issue in simonw/claude-code-transcripts for details.
agent-log-gif web # interactive session picker
agent-log-gif web SESSION_ID # specific session
agent-log-gif web --repo owner/repo # filter by repo
On macOS, credentials are auto-detected from your keychain. On other platforms, provide --token and --org-uuid.
All options
agent-log-gif json [OPTIONS] [FILE]
-o, --output PATH Output file path (default: <input>.<format>)
--list [claude|codex] List recent sessions instead of converting
--format [gif|mp4|avif] Output format (default: gif)
--turns TEXT N for first N turns, M,N for range
--music PATH Music track for MP4
--loop-music Loop music if shorter than video
--chrome STYLE Window chrome: none|mac|mac-square|windows|linux
--canvas-bg TEXT Outer canvas color outside rounded macOS corners
--color-scheme NAME Terminal color scheme (e.g. Dracula, Nord)
--font PATH Custom TTF font file
--cols INT Terminal width in columns (default: 80)
--rows INT Terminal height in rows (default: 18)
--font-size INT Font size in pixels (default: 16)
--show TYPES Extra content: tools, calls, thinking, all
--speed FLOAT Typing speed multiplier (default: 1.0)
--spinner-time FLOAT Spinner duration multiplier (default: 1.0)
--thinking-verbs TEXT Custom spinner verbs (comma-separated)
--shimmer / --no-shimmer Loading line shimmer effect (default: on)
--colors INT GIF palette size, 2-256 (default: 256)
--parallel INT Rendering workers (0=auto, 1=off, 2+=explicit)
--open / --no-open Open result in default viewer
agent-log-gif search KEYWORD [--source claude|codex]
Credits
Session parsing logic originally based on Simon Willison's claude-code-transcripts.
Gifsicle by Eddie Kohler (GPLv2 license) is used for (optional) gif optimization.
gifsicle-bin provides auto-installation of arms-length gifsicle binaries (native wheels) and WASM builds (GitHub Release assets) for optimization.
Gifsicle WASM build approach based on Simon Willison's work.
Color schemes from iTerm2-Color-Schemes by Mark Badolato (MIT license).
Development
See CONTRIBUTING.md for setup and guidelines.
Metadata
Release files for agent-log-gif 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_log_gif-0.1.4.tar.gz | 840.5 kB | With provenance | Details for agent_log_gif-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_log_gif-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for agent_log_gif-0.1.4-py3-none-any.whl |
Total release size: 1.2 MB
Release files / agent_log_gif-0.1.4.tar.gz
| Download URL | agent_log_gif-0.1.4.tar.gz |
|---|---|
| Size | 840.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c632c1d1d39458fb1c21201a26b646e0906163fbf25e31a775c1d54c4d97f30
|
|
BLAKE2b-256 checksum How to use checksums |
35ba5437f96b6a43cfac718b22ae186920ebc04fbb78aa47a762fa3fe0d815fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logRelease files / agent_log_gif-0.1.4-py3-none-any.whl
| Download URL | agent_log_gif-0.1.4-py3-none-any.whl |
|---|---|
| Size | 310.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
668ae69bebb3c411d5f0aa6a9eea6edb0c8b4d0854e7036272ce4ac275f763cc
|
|
BLAKE2b-256 checksum How to use checksums |
3e8fb903eec19ba1b82fb0d2d1eee9b29dcca5e16e3ac8edd82103c5d2bcabd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logSecurity for agent-log-gif 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for agent_log_gif-0.1.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.