lsix: Like "ls", but for images

lsix Functionality & Use Cases

  • lsix lists image thumbnails in the terminal using sixel, effectively “ls for images.”
  • Users like it for quick visual inspection over SSH, console‑based analysis, and image-processing workflows where seeing intermediate outputs inline is helpful.
  • Some consider it “genius” and appreciate not having to download images or open a GUI viewer.
  • Others question why one would force pixel graphics into a text terminal instead of using a normal image viewer.

Sixel Graphics & Terminal Support

  • Works only on sixel-capable terminals. Confirmed working: xterm (with VT340 mode), mlterm, Mintty, some tmux builds with --enable-sixel, Zellij, and certain modern terminals.
  • Many popular terminals lack sixel, especially those based on libvte (e.g., GNOME Terminal). Emacs and PuTTY/KiTTY also don’t support it.
  • Some terminals implement alternative image protocols (e.g., Kitty), seen by some as “NIH” versus adopting sixel.
  • A capability query (ESC [ c) is used to detect sixel support.

Tmux, Zellij, and Multiplexing

  • Recent tmux versions can be built with sixel support, enabling lsix inside tmux sessions.
  • Extensive discussion explains tmux’s value: multiplexing, persistence across SSH disconnects, portable keybindings, and collaboration. Often combined with mosh.
  • Zellij is highlighted as a more ergonomic, batteries‑included alternative that already supports sixel and offers floating panes.

Performance, Dependencies & Alternatives

  • lsix is a Bash script depending directly on ImageMagick; the large dependency list mainly comes from codecs required by ImageMagick.
  • Some find this heavy; others argue it’s reasonable for broad format support.
  • Alternatives mentioned: chafa, timg, catimg, fzf preview with sixel, and terminal‑native image protocols like iTerm2/konsole’s imgcat.

Security Considerations

  • Multiple comments warn that parsing untrusted images (via ImageMagick or libraries like libpng) can be an attack vector.
  • Past CVEs in image libraries and even “1‑click” GNOME bugs are cited as examples; caution is advised when running on untrusted directories.

Design & UX Notes

  • Filenames currently rendered as pixels, not selectable text, limit usability for some workflows.
  • PDFs are skipped by default due to slowness; some find this surprising and would prefer slow-but-explicit behavior with an opt‑out flag.
  • Desire expressed for sixel and similar capabilities in the Linux console and more mainstream terminals.