An open API service indexing awesome lists of open source software.

https://github.com/thaapasa/peek

A modern file viewer for the terminal.
https://github.com/thaapasa/peek

file previewer rust viewer

Last synced: about 2 months ago
JSON representation

A modern file viewer for the terminal.

Awesome Lists containing this project

README

          

# peek

```
__
___ ___ ___ / /__
/ _ \/ -_) -_) '_/
/ .__/\__/\__/_/\_\
/_/ a file previewer
```

Modern terminal file viewer — preview any file, any format.

- **Syntax highlighting** for 100+ languages via syntect
- **Pretty-printing** for JSON / YAML / TOML / XML
- **Aligned tables** for CSV / TSV with sticky header, type inference, streaming record reader
- **SQLite databases** — read-only schema listing + streaming row viewer with sliding-window cursor
- **Spreadsheets** — `.xlsx` / `.xlsm` / `.ods`: sheet listing → aligned table per sheet, CSV extract, workbook metadata
- **ASCII-art image rendering** with glyph-matched 24-bit color. Animated gifs!
- **Documents** — Markdown, Jupyter notebooks (`.ipynb`), PDF, Adobe Illustrator (`.ai`), DOCX, ODT, RTF, EPUB, CBZ
- **Email** — `.eml` messages and `.mbox` mailboxes: rendered headers + body, attachment listing + extract, message-list drill-in
- **Calendar / contacts** — iCalendar (`.ics`) and vCard (`.vcf`): rendered agenda / contact cards with human date-times, grouped fields, recurrence
- **Vector / PostScript** — EPS / PostScript (`.eps`, `.ps`): embedded preview, optional Ghostscript render, DSC metadata
- **Containers** — ZIP / tar / 7z / cpio archives, ISO disk images, audio metadata
- **Executables** — ELF / Mach-O / PE object files: header, sections, symbols
- **Java classfiles** — `.class` header, fields, methods with decoded signatures
- **Certificates and keys** — PEM / DER X.509 / CSR / CRL / keys / OpenSSH pubkeys / JWK: subject, validity, SANs, fingerprints, thumbprints
- **Fonts** — TrueType / OpenType / TTC collections / WOFF / WOFF2: rasterised specimen render + family / weight / glyphs / script coverage
- **Hex dump** fallback for binary, reachable from any view with `x`
- **Interactive viewer** with live theme cycling, info screen, extraction, text search

peek is a single-file viewer: one path (or stdin) at a time. Run peek once per file.

## Install

macOS / Linux:

```sh
curl -fsSL https://raw.githubusercontent.com/thaapasa/peek/main/install.sh | sh
```

Installs the latest release into `~/.local/bin`. Supports `aarch64` and `x86_64`. Pin a version
with `PEEK_VERSION=v0.1.0` or relocate with `PEEK_INSTALL_DIR=/usr/local/bin`.

Manual downloads, Windows, building from source, and updating: see the
[Installation chapter](https://thaapasa.github.io/peek/installation.html) of the manual.

## Usage

```sh
peek src/main.rs # source code (syntax highlighted, interactive viewer)
peek photo.jpg # image (glyph-matched ASCII art)
peek config.json # structured data (pretty-printed + highlighted)
peek book.epub # paged read with TOC + metadata views
peek archive.tar.gz # listing view + per-entry extract
peek /bin/ls # executable — header / sections / symbols
peek Main.class # Java classfile — fields, methods, signatures
peek server.pem # certificate / key — subject, validity, SANs, fingerprints
peek Lobster.ttf # font — rasterised specimen + family / weight / scripts
peek invite.ics # calendar — agenda with dates, recurrence, attendees
peek contacts.vcf # vCard — grouped contact cards
peek - # explicit stdin
echo '{"a":1}' | peek # piped stdin auto-detected
```

Run `peek -h` for the short option list, `peek --help` for the full set, or read the
[manual](https://thaapasa.github.io/peek/) for per-format details, keyboard shortcuts,
extraction, themes, and the full CLI reference.

## Manual

Full user manual: ****.

Sources in [`manual/`](manual/) — built with [mdbook](https://rust-lang.github.io/mdBook/).
Local preview:

```sh
cargo install mdbook
mdbook serve manual # opens http://localhost:3000
```

## License

MIT