Feature Request: Terminal Graphics Protocol Support (Sixel, Kitty, iTerm2)
Resolved 💬 25 comments Opened Jun 18, 2025 by gwpl Closed Apr 7, 2026
TL;DR / Abstract
Enable terminal graphics display in Claude Code by implementing support for Sixel, Kitty, and iTerm2 inline image protocols. This would allow users to view graphical output from commands (charts, diagrams, plots) directly in the terminal, enhancing data visualization and development workflows.
Problem Statement
Currently, Claude Code cannot display graphical output from terminal commands. Tools like lsix, viu, and various plotting libraries fail to render images, limiting visual feedback for:
- Data visualization (matplotlib, plotly outputs)
- Image processing results
- System diagrams and flowcharts
- Build process visualizations
- Test coverage reports with visual elements
Proposed Solution
Implement support for three major terminal graphics protocols:
1. Sixel (Six Pixels)
- Specification: DEC VT340/ANSI escape sequence based bitmap format
- Format:
ESC P q [data] ESC \ - Features: 6-pixel high strips, RLE compression, palette-based colors (max 256)
- Adoption: XTerm, mlterm, foot, WezTerm, Konsole, VS Code terminal
- Pros: Widest compatibility, standardized since 1980s
- Cons: Limited color palette, no alpha channel
2. Kitty Graphics Protocol
- Format:
ESC _ G [control data] ; [payload] ESC \ - Features: Full RGBA support, GPU acceleration, multiple placement modes
- Adoption: Kitty, WezTerm, Konsole
- Pros: Best performance, full color support, advanced features
- Cons: Limited terminal support
3. iTerm2 Inline Images
- Format:
ESC ] 1337 ; File = [args] : [base64 data] ^G - Features: Direct base64 encoding, supports animations, Retina displays
- Adoption: iTerm2, WezTerm, mintty, Konsole
- Pros: Simple implementation, works partially in tmux
- Cons: macOS-centric origin
Implementation Approach
- Auto-detection: Check
$TERM,$TERM_PROGRAM, and capability queries - Fallback chain: Kitty → iTerm2 → Sixel → Unicode blocks (▄▀)
- Library integration: Consider using existing libraries like:
- Rust: viuer (supports all three protocols)
- Go: termimg
- Python: term-image
Testing Tools
# Sixel test
convert image.jpg -geometry 800x480 sixel:-
# iTerm2 test
printf "\e]1337;File=inline=1:"; base64 -w0 image.jpg; printf "\a\n"
# Tools to verify
lsix *.png # Sixel image viewer
viu --features=sixel *.png # Multi-protocol viewer
img2sixel image.png # Direct sixel conversion
Use Cases
- Development
- Preview generated images/plots without leaving terminal
- View test coverage heatmaps
- Display architecture diagrams
- Data Science
- Show matplotlib/seaborn outputs inline
- Quick data exploration visualizations
- Model performance graphs
- DevOps
- System monitoring dashboards
- Network topology diagrams
- Container relationship visualizations
References
- Sixel Specification
- Kitty Graphics Protocol
- iTerm2 Inline Images
- Are We Sixel Yet?
- Terminal Graphics Comparison
Success Criteria
- [ ] Auto-detect terminal capabilities
- [ ] Display images from common tools (lsix, viu, img2sixel)
- [ ] Handle protocol-specific limitations gracefully
- [ ] Provide clear error messages for unsupported terminals
- [ ] Document supported terminals and protocols
This feature would significantly enhance Claude Code's capabilities for visual development workflows while maintaining backward compatibility through intelligent fallbacks.
25 Comments
Important Clarification
This feature request primarily targets the shell command execution mode (commands run with
\!prefix or via the Bash tool). Users frequently need to visualize outputs from their development workflows:Immediate Benefits (Shell Commands)
Future Potential: Visual Reasoning Capabilities
Beyond shell command support, terminal graphics could enable Claude to participate in visual analysis alongside users:
This would transform Claude Code from a text-only assistant to a visual collaborator, enabling richer human-AI interaction for data-heavy and visually-oriented development tasks.
The implementation should prioritize shell command support first, with the understanding that this infrastructure could later enable multimodal reasoning capabilities.
I would really like to see this implemented! I think it would reinforce the validity of Claude Code in the terminal!
I would love to have this! As more dev work moves to the CLI, features that eliminate context-switching are essential. Being able to instantly see visual outputs from Claude would be a huge win for keeping developers in a state of flow.
+1
+1
+1
+1
+1
+1
🖼️ Implementation Proposal: Terminal Image Preview Feature
I'd like to add my support for this feature and share a concrete implementation proposal.
Proposed Architecture
Implementation Details
1. Terminal Detection (TypeScript)
2. Protocol Implementation
| Protocol | Escape Sequence | Max Colors | Alpha |
|----------|----------------|------------|-------|
| Kitty |
ESC_Gf=32,s=<w>,v=<h>;[base64]ESC\| 16M | ✅ || iTerm2 |
ESC]1337;File=inline=1:[base64]^G| 16M | ✅ || Sixel |
ESCPq[sixel_data]ESC\| 256 | ❌ |3. Graceful Fallback
For unsupported terminals, keep the current
[Image #N]clickable link behavior.Use Cases
Existing Libraries
Consider using:
terminal-image,term-imgConfiguration Suggestion
I believe this would significantly improve the developer experience, especially for:
Happy to help with implementation if the team decides to move forward with this! 🚀
---
Comment generated with assistance from Claude Code
+1
optimizing Claude code output unrendered LaTeX formulas
+1
Dear claude-code developers, please do not hard-code against any terminal for detecting sixels support. Use
DA1orXTSMGRAPHICSto detect a supporting terminal, which is an increasing number lately.And yeah, I'd love that feature to be available too, in claude-code. 😄
Another inspiration !
Working with Claude Code on STL files etc,
Claude Code or scripts can render with
f3dtool and preview/show how looks like( e.g. https://github.com/edu-samples/26Q1-3d-printing-model-from-code/blob/a08ff72a9f4ee37169c4ba8a322faafeba792f60/output/3d-examples/vesa-lightplate-75-4mm-iso-back-left.png
rendered using C++
f3drenderer https://github.com/edu-samples/26Q1-3d-printing-model-from-code/blob/fa16b68a16d885f9274979450427359d5bb50473/render_stl.py#L24)
without leaving terminal when working on scripts!
So diagrams, charts, OCR/Scans preview, ML Charts etc previews, STL / 3D preview.. possibilities are endless :). (and on a top of it Claude Code can "see" images as well!
This would be great. I was just wanting to see a workflow as graphviz using the kitty graphics format and Claude wasn't able to do it today.
<img width="2319" height="203" alt="Image" src="https://github.com/user-attachments/assets/5ea0917f-b0f5-4760-9f79-03759fb836ae" />
This is an actually practical usecase. It would be nice to actually show the screenshot rather than
[Image #1]:-)I'd love to use this for data vis problems, allowing claude to inline charts in its responses to me when I'm discussing a problem
+1
+1
+1
+1 on this. I'm using Ghostty which supports the Kitty graphics protocol natively.
My use case: I use Claude Code to generate images (charts, diagrams, UI mockups via PIL/Pillow), and currently the only way to view them is to either:
open file.pngto open in Preview (breaks flow)I tried setting up a PostToolUse hook that writes to
/dev/ttyto bypass Claude Code's stdout capture — it partially works but is fragile.The ideal solution would be for Claude Code to pass through Kitty/Sixel escape sequences to the terminal instead of stripping them. Even a simple "render image at path" built-in command would be a huge improvement for terminals that support graphics protocols (Ghostty, Kitty, WezTerm, iTerm2).
I'm using Claude Code in VS Code's terminal mode with a 1M context window (Opus 4.6). My main use cases for inline image rendering:
open file.pngdisrupts the conversation)Running on macOS with
terminal.integrated.enableImages: truein VS Code, which supports Sixel/Kitty since v1.110 — the terminal side is ready, just waiting for Claude Code to pass through the graphics.Would love this both in the terminal and in the VS Code extension's graphical panel, as suggested by @JannikLohausComuneo.
+1
Hi @antrewmorrison, I just noticed that this was closed and I'm curious: does this mean this feature will be included in an upcoming release of Claude Code, or is it not planned? Thanks!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.