Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

ScopeSV/peek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peek

A terminal file previewer written in Zig 0.16. Renders images, PDFs, Markdown, and text directly inside your terminal using the Kitty graphics protocol.

Features

  • Image preview (PNG, JPEG, and anything stb_image decodes)
  • PDF preview (single page, selectable via --page)
  • Markdown rendering with inline images
  • Plain text dumping
  • Cross-platform (Linux and macOS, x86_64 and aarch64)

Installation

Homebrew (macOS & Linux)

brew tap ScopeSV/tap https://codeberg.org/ScopeSV/homebrew-tap.git
brew install peek

This also installs mupdf (required for PDF previews).

Download binary

Grab the latest binary for your platform from the Releases page.

# Example for Linux x86_64
chmod +x peek-x86_64-linux
mv peek-x86_64-linux ~/.local/bin/peek

Build from source

Requires Zig 0.16.

git clone https://codeberg.org/ScopeSV/peek.git
cd peek
zig build -Doptimize=ReleaseSafe
cp zig-out/bin/peek ~/.local/bin/

Usage

peek [options] <file>

Options

Flag Description
--page N, -p N PDF page to render (1-indexed)
-h, --help Show help

Examples

peek photo.png
peek document.pdf --page 3
peek notes.md
peek script.zig

Requirements

  • A terminal that supports the Kitty graphics protocol — e.g. Kitty, Ghostty, WezTerm. Image and PDF previews will not display in terminals without it (including vim's embedded terminal).
  • For PDF previews: mutool must be on your PATH. Install it via:
    • Debian/Ubuntu: apt install mupdf-tools
    • Arch: pacman -S mupdf-tools
    • Alpine: apk add mupdf-tools
    • Fedora: dnf install mupdf
    • macOS (Homebrew): brew install mupdf

Other formats (images, Markdown, text) work without any external tools.

License

MIT

About

Preview files directly in your terminal. (Mirror from https://codeberg.org/ScopeSV/peek)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors