Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

viewer

Image

Version Rust License Platform Stay Amazing

A universal read-only file viewer for the terminal. Point it at almost any file — spreadsheet, document, slide deck, PDF, image, code — and it renders a clean preview, then launches the right editor on a keypress. Part of the Fe2O3 Rust terminal suite.


The idea

One viewer for everything LibreOffice-shaped, plus text, code and images. It detects the file type and renders it read-only with the right method — calamine for tables, pandoc for documents, pdftotext for PDFs, syntax highlighting for code, inline images via kitty/sixel — then hands off to an editor when you want to change something. Formats live in a small config table, so adding one is a line, not a recompile.

Screenshots

viewer — spreadsheet table viewer — syntax-highlighted code viewer — slide deck viewer — inline image

Features

  • Tables — csv/tsv, xlsx/ods (calamine); aligned columns, Excel dates as YYYY-MM-DD.
  • Documents — docx/odt via pandoc.
  • Slides — pptx/odp text outline with per-slide dividers.
  • PDF — pdftotext.
  • Images — rendered inline via glow (kitty / sixel).
  • Code & text — syntax-highlighted with highlight (18 languages plus Markdown, HyperList, LaTeX).
  • Launches the right editore opens grid / scribe / $EDITOR per type; x opens with the system default (xdg-open).
  • AI editingCtrl+A opens an integrated Claude Code session seeded with the file; the matching skill (pptx / docx / xlsx / pdf) edits it in place, preserving layout. For slide decks it keeps a live PDF preview in sync: Claude re-renders with slidepreview after each change, and a single zathura window (opened once, placed wherever you like) auto-reloads it.
  • Browseo (or launching with no file) opens pointer as the file picker.
  • Config-driven and extensible via ~/.config/viewer/handlers.conf.

Install

# From a release (Linux/macOS, x86_64/aarch64)
chmod +x viewer-* && sudo cp viewer-linux-x86_64 /usr/local/bin/viewer

# Or build from source (needs the sibling crust/glow/highlight crates alongside)
for r in crust glow highlight viewer; do git clone https://github.com/isene/$r; done
cd viewer && cargo build --release

Usage

viewer report.docx
viewer data.xlsx
viewer photo.png
viewer              # no file → browse with pointer

Keys

Key Action
j k / arrows scroll
g G top / bottom
PgUp PgDn page
e Enter edit — launch the right editor (slide decks open the Claude session)
Ctrl+A edit with Claude — full session (uses the file-type skill)
x open externally (xdg-open)
o browse files (pointer)
? help
q quit

Configuring formats

~/.config/viewer/handlers.conf — one line per extension:

# ext   kind    edit-command
pptx    slides  -
epub    doc     scribe
ini     text    $EDITOR

kind is one of table / text / doc / slides / pdf / image / hex; - means view-only; the edit-command can be xdg-open to defer to the system default.

Part of Fe2O3

viewer is one tool in the Fe2O3 suite of fast Rust terminal apps. It builds on crust, glow and highlight, launches grid for spreadsheets, and uses pointer to browse.

License

Public domain (Unlicense).

About

Universal TUI file viewer — read-only preview of any office/text/data file, launches the right editor. Config-driven, expandable. Part of the Fe2O3 Rust terminal suite.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages