Display images in your terminal using the kitty graphics protocol.
kittyview renders PNG, JPEG, SVG, and many other image formats directly in your terminal. It auto-detects terminal support and produces clean, chunked output that works with large images.
kittyview auto-detects support via environment variables. Confirmed compatible terminals:
Use --force if your terminal supports the protocol but isn't detected.
Download from GitHub Releases for Linux (amd64, aarch64), macOS (Intel, Apple Silicon), and Windows (amd64, aarch64). Linux binaries are statically linked.
cargo install --path .
# Display an image
kittyview photo.jpg
# Display an SVG diagram
kittyview architecture.svg
# Display the built-in logo
kittyview logo
The png subcommand exports any supported format as a PNG file, useful for debugging or format conversion:
# Convert SVG to PNG
kittyview png diagram.svg -o diagram.png
# Export the built-in logo
kittyview png --logo -o logo.png
# Pipe to another tool
kittyview png chart.svg | feh -
# Bash
kittyview completions bash > ~/.local/share/bash-completion/completions/kittyview
# Zsh
kittyview completions zsh > ~/.local/share/zsh/site-functions
# Fish
kittyview completions fish > ~/.config/fish/completions/kittyview.fish
| Format | Extensions |
|---|---|
| PNG | .png |
| JPEG | .jpg, .jpeg |
| GIF | .gif |
| SVG | .svg, .svgz (with full text rendering) |
| WebP | .webp |
| BMP | .bmp |
| TIFF | .tif, .tiff |
| ICO | .ico |
| PNM | .ppm, .pgm, .pbm |
| TGA | .tga |
| QOI | .qoi |
| Farbfeld | .ff |
| HDR | .hdr |
SVG files are detected by extension or by content sniffing (<svg in the first 1KB).
When rendering SVGs, external file references (<image href="...">) are blocked by default. Use --svg-resources to control this:
| Policy | Allows |
|---|---|
none (default) |
Embedded/inline images only. No file access. |
cwd |
Files in the current working directory. |
tree |
Files in the current working directory and subdirectories. |
any |
Unrestricted file access. |
Data URLs (images embedded directly in the SVG) always work regardless of policy.
# Render an SVG that references local images
kittyview --svg-resources tree diagram.svg
- Terminal detection: kittyview refuses to emit escape sequences to non-terminal stdout or unsupported terminals unless
--forceis used. This prevents accidental binary output to files or pipes. - SVG sandboxing: External file access from SVGs is blocked by default (
--svg-resources none). - SVG size limits: Oversized SVGs are automatically downscaled (max 8192x8192) to prevent memory exhaustion.
- Pure Rust: No C dependencies. The entire dependency tree compiles from Rust source.
- Crash safety: Kitty protocol output is fully buffered before writing to minimize partial escape sequences if the process is interrupted.
Requires Rust 1.85+ (edition 2024).
cargo build --release
Run tests:
cargo test
Apache-2.0