Skip to content

brege/ghrm

Repository files navigation

ghrm logo

ghrm

Explore your filesystem as if it were on GitHub.

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 mixing images, HTML, large tables and JSON and other assets in your browser. 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

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. On first run, ghrm locally downloads the browser libraries from CDNs and, outside of sources or maps you may already have in your Markdown, never touches the internet again. It renders Markdown and file trees the exact same way as GitHub does. There's zero mystery what your docs are going to look like after you push.

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 install --git https://github.com/brege/ghrm ghrm

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" end }

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