Skip to content

brege/ghrm

Repository files navigation

ghrm logo

ghrm

crates.io CI License

Ghrm supports all GitHub-flavored Markdown features, Readme and source code viewing, detects repositories, has instant file retrieval, and works completely offline. It makes file browsing and file reading feel more continuous and much easier to work on projects that mix images, HTML, large tables, JSON, and other assets your browser handles well. You get both the backend performance of Rust and the multimedia performance of your browser.

Supported Features

  • Works offline
  • Live reloading
  • Preview Markdown, source code, and images
  • Light-and-dark theme
  • Chromeless PDF printing

File explorer

  • Search instantly by path and content
  • Git history metadata
  • Filters for gitignores, excludes, custom groups
  • Sorting and breadcrumb navigation

Markdown

  • Syntax highlighting
  • Admonitions [!NOTE]
  • Mermaid diagrams
  • KaTeX math
  • GeoJSON and TopoJSON maps (exp.)

Terminal

ghrm .

Neovim

:Ghrm

Ethos

I made Ghrm because when I lose internet/power, I often turn toward documentation and repo-gardening to stay occupied while online resources are unavailable. There's zero mystery what your docs are going to look like after you push.

Important

On first run, ghrm locally downloads the browser libraries from CDNs and (outside of sources or maps you may already have embedded in your Markdown file) never touches the internet again. It renders Markdown and file trees the way GitHub does.

Note

Ghrm is non-mutating. It's not meant to be a general git repo manager.

You can use --bind 0.0.0.0 to connect to a ghrm instance from other devices in your network. It's automatically password protected, set via config.toml.

Install

Cargo

cargo install ghrm

Binary

Download from the releases page, extract, and add to PATH.

Usage

One file.

ghrm README.md

Multiple files, recursively.

ghrm ~/src

Opens a live-reloading preview in your browser. Edits to the file in your editor are reflected automatically on save.

Neovim

Add to your lazy.nvim config:

{ "brege/ghrm" }

Commands: :Ghrm to start, :GhrmStop to stop, or just exit nvim.

Examples

ghrm smoke/basics.md
ghrm smoke/diagrams.md
ghrm smoke/languages.md

Uninstall

ghrm --clean
cargo uninstall ghrm

Inspiration

Reference

License

GPL-3.0