| Crates.io | showme |
| lib.rs | showme |
| version | 0.1.1 |
| created_at | 2025-10-24 23:37:39.582306+00 |
| updated_at | 2026-01-21 23:09:03.570863+00 |
| description | A powerful terminal image and video viewer supporting multiple formats and rendering backends |
| homepage | https://github.com/sandwichfarm/showme |
| repository | https://github.com/sandwichfarm/showme |
| max_upload_size | |
| id | 1899472 |
| size | 376,719 |
showme is a powerful terminal image and video viewer written in Rust. View images, videos, PDFs, and SVGs directly in your terminal without leaving your workflow.
Pre-built binaries are available for multiple platforms with varying feature support:
| Platform | Video Support | Sixel | All Other Features* |
|---|---|---|---|
| Linux x86_64 | ✅ Yes | ✅ Yes (optional) | ✅ Yes |
| Linux ARM64 | ❌ No† | ❌ No | ✅ Yes |
| macOS x86_64 (Intel) | ✅ Yes | ❌ No | ✅ Yes |
| macOS ARM64 (Apple Silicon) | ✅ Yes | ❌ No | ✅ Yes |
| Windows x86_64 | ❌ No‡ | ❌ No | ✅ Yes |
* All other features include: Unicode rendering, Kitty graphics, iTerm2 images, QOI format, PDF rendering, and SVG support † Linux ARM64: Cross-compilation constraints prevent video support in pre-built binaries. Build from source with ffmpeg for video. ‡ Windows: Complex ffmpeg setup prevents video support in pre-built binaries. Build from source with vcpkg for video.
Building from source allows you to enable all features on any platform if dependencies are available. See Building from Source.
-p half)-p quarter, default)--backend kitty)--backend iterm2)--features sixel + --backend sixel)--backend auto, default) with support for:
allow-passthrough enablement (tmux >= 3.3)-w, -H)-W/--fit-width)--fit-height)-U/--upscale on, -U i for integer scaling)--width-stretch)--auto-crop)--crop-border N)-a/--no-antialias)- for piping images)-f and -F for batch processing)--grid N or --grid NxM) with configurable spacing--center)--scroll with --delta-move)--wait, --wait-rows)--title)--background, --pattern, --pattern-size)--alternate-screen)--clear, --clear-between)--hide-cursor)--color8)-o)--verbose)--loop (infinite), --loops N (specific count)--frames N (limit), --frame-offset N (skip initial)-t/--duration (e.g., "10s", "500ms")--threads N)--compress)You need a recent Rust toolchain (edition 2024). Once Rust is installed:
cargo build --release
Run the viewer directly with:
cargo run --release -- <files>
Or install it into your $CARGO_HOME/bin for regular use:
cargo install --path .
The following features are enabled by default:
unicode: Unicode block renderer (always recommended)kitty: Kitty graphics protocol backenditerm2: iTerm2 inline images backendvideo: Video playback support via ffmpegqoi: QOI image format supportpdf: PDF rendering supportsvg: SVG/SVGZ rendering supportOptional features:
sixel: Enable the Sixel backend. Requires libsixel. Activate with cargo build --features sixel.To build with minimal features:
cargo build --no-default-features --features unicode,kitty,iterm2
showme can be used as a Rust crate to add terminal image/video rendering capabilities to your own applications.
Add to your Cargo.toml:
[dependencies]
showme = { git = "https://github.com/sandwichfarm/showme" }
# Or when published to crates.io:
# showme = "0.1"
use showme::{Cli, Renderer};
fn main() -> showme::Result<()> {
// Parse CLI arguments and render
let cli = Cli::parse();
let config = cli.into_config()?;
let renderer = Renderer::build(config)?;
renderer.run()
}
Bypass CLI parsing and configure programmatically:
use std::path::PathBuf;
use showme::{
Config, Renderer, BackendKind, RenderSizing,
config::{PixelationMode, RotationMode, BackgroundColor}
};
fn main() -> showme::Result<()> {
let mut config = Config {
inputs: vec![PathBuf::from("photo.jpg")],
backend: BackendKind::Auto,
sizing: RenderSizing {
width_cells: Some(80),
height_cells: None,
fit_width: true,
..RenderSizing::unconstrained()
},
pixelation: PixelationMode::Quarter,
rotation: RotationMode::Exif,
background: BackgroundColor::Auto,
quiet: false,
verbose: false,
// ... other Config fields with sensible defaults
};
let renderer = Renderer::build(config)?;
renderer.run()
}
Load and process images directly:
use std::path::Path;
use showme::image::load_image;
use showme::config::RotationMode;
let sequence = load_image(
Path::new("photo.jpg"),
RotationMode::Exif,
true, // auto_crop
10 // crop_border
)?;
println!("Loaded {} frames", sequence.frames.len());
println!("First frame: {}x{}",
sequence.frames[0].pixels.width(),
sequence.frames[0].pixels.height()
);
config: Configuration types and buildersbackend: Rendering backends (Unicode, Kitty, iTerm2, Sixel)image: Image/video loading and decodingcapabilities: Terminal detection and feature probingerror: Error types and Result aliasFor detailed API documentation, see docs/library/README.md.
# View a single image
showme photo.jpg
# Use quarter-block mode for better detail (default)
showme -p quarter image.png
# Use half-block mode for better color accuracy
showme -p half image.png
# View images in a grid
showme --grid 3 screenshots/*.png
# View video files
showme video.mp4
# Play video for 10 seconds
showme -t 10s video.mp4
# Loop animation 3 times
showme --loops 3 animation.gif
# Show only first 50 frames
showme --frames 50 animation.gif
# Skip first 100 frames, show next 50
showme --frame-offset 100 --frames 50 video.mp4
# View PDF documents (shows all pages as frames)
showme document.pdf
# View SVG files
showme logo.svg
# Scroll through large images
showme --scroll --delta-move 5,2 large-image.jpg
# Read from stdin
cat image.jpg | showme -
# Read list of images from file
showme -f images.txt
# Read list with paths relative to file location
showme -F /path/to/gallery/images.txt
# Combine file list with other images
showme -f batch1.txt extra-image.png -f batch2.txt
# Constrain dimensions
showme --width 120 --height 40 gallery/*.gif
# Fit to width (may overflow terminal height)
showme --fit-width wide-panorama.jpg
# Fit to height (may overflow terminal width)
showme --fit-height tall-portrait.jpg
# Upscale small images
showme --upscale on small-icon.png
# Integer upscaling (no antialiasing)
showme -U i -a pixel-art.png
# View phone photos with automatic rotation
showme phone-photos/*.jpg
# Disable EXIF rotation if needed
showme --rotate off rotated-image.jpg
# Auto-crop screenshots to remove borders
showme --auto-crop screenshot.png
# Crop fixed 10px border, then auto-crop the rest
showme --crop-border 10 --auto-crop scanned-document.jpg
# Slideshow with titles
showme --wait 2 --title "%n/%f" vacation/*.png
# Use alternate screen (clear on exit)
showme --alternate-screen animation.gif
# Center images with custom background
showme --center --background "#1e1e1e" logo.png
# Use 8-bit color mode for older terminals
showme --color8 image.png
# Output to file instead of stdout
showme -o output.txt image.png
# Verbose mode with terminal info
showme --verbose photo.jpg
# Use specific number of threads
showme --threads 4 gallery/*.jpg
Pass --help to see the complete option list.
File lists allow you to batch process many images without shell glob limits. Create a text file with one image path per line:
# images.txt - Example file list
photo1.jpg
photo2.png
vacation/beach.jpg
# Lines starting with # are comments
# Empty lines are ignored
/absolute/path/to/image.png
relative/path/to/image.gif
Usage:
-f FILE: Relative paths resolved from current directory-F FILE: Relative paths resolved from file list's directoryExample workflow:
# Create a file list
find ~/Pictures -name "*.jpg" > my-photos.txt
# View all photos
showme -f my-photos.txt
# Or use -F if you move the file list
showme -F ~/gallery/images.txt
The project has comprehensive test coverage with 34+ library tests and integration tests covering:
Run the test suite:
cargo test
Run tests with output:
cargo test -- --nocapture
Run specific test module:
cargo test config_tests
cargo test rendering_tests
cargo test capabilities_tests
cargo test integration_tests
Additional documentation is available:
examples/ directory:
basic_viewer.rs - Simple image viewercustom_backend.rs - Backend selectionprogrammatic_config.rs - Advanced configurationimage_processing.rs - Direct image processingRun examples with:
cargo run --example basic_viewer path/to/image.jpg
Contributions are welcome! Please see CONTRIBUTING.md for:
Before submitting a pull request:
# Run tests
cargo test
# Check formatting
cargo fmt --check
# Run linter
cargo clippy -- -D warnings
For questions or bug reports, please open an issue on GitHub.
showme is distributed under the terms of the GPL-2.0 license. See LICENSE for details.