Skip to content

atani/glowm

glowm

codecov

Read Markdown architecture docs in your terminal — with Mermaid diagrams rendered inline.

glowm is a terminal-first Markdown viewer for developers who keep design docs, ADRs, and diagrams next to the code. It renders Markdown beautifully in the terminal, displays Mermaid diagrams inline on modern terminals like iTerm2, Kitty, and Ghostty, and can export diagrams to PDF when you need to share them outside the terminal.

Stop opening a browser just to preview Mermaid diagrams in Markdown.

glowm demo screenshot

Why glowm?

Many engineering teams keep architecture notes, runbooks, ADRs, and design documents in Markdown. Mermaid makes those docs more useful, but most terminal Markdown viewers leave Mermaid blocks as plain code.

glowm keeps the whole workflow in your terminal:

  • Inline Mermaid diagrams on iTerm2, Kitty, and Ghostty
  • PDF export for Mermaid diagrams when you need an artifact
  • Pager-first reading for long documentation files
  • STDIN support for piping generated docs or command output
  • Glow-like Markdown rendering with familiar terminal ergonomics

Perfect for

  • Reading architecture docs and ADRs without leaving the terminal
  • Previewing Mermaid-heavy README files before committing
  • Reviewing documentation in SSH sessions or terminal-only workflows
  • Exporting diagrams from Markdown docs to PDF
  • Teams that prefer docs-as-code over browser-only documentation tools

Install

Homebrew

brew tap atani/tap
brew install glowm

Go

go install github.com/atani/glowm/cmd/glowm@latest

Quick start

# Render Markdown to ANSI output
glowm README.md

# Read from STDIN
cat README.md | glowm -

# Export Mermaid diagrams to PDF
glowm --pdf README.md > diagrams.pdf

Mermaid rendering

When stdout is a supported terminal, Mermaid code blocks are rendered inline as images:

  • iTerm2
  • Kitty
  • Ghostty

On other terminals, Mermaid blocks gracefully fall back to code blocks.

Chrome or Chromium is required for Mermaid rendering and PDF export.

Comparison

Feature glowm Glow Browser preview VS Code preview
Terminal Markdown reading
Inline Mermaid diagrams in terminal
Mermaid PDF export Varies Varies
Works with STDIN / pipes
Good for SSH / terminal-only workflows
Docs stay close to the codebase

Options

  • -w Word wrap width
  • -s Style name (dark, light, notty, auto) or JSON style path
  • -p Force pager output, overriding --no-pager
  • --no-pager Disable default pager; pager is on by default for TTY
  • --pdf Export Mermaid diagrams to PDF via stdout
  • --version Show version information

Config

glowm reads the config file from the OS-specific user config directory:

  • macOS: ~/Library/Application Support/glowm/config.json
  • Linux: ~/.config/glowm/config.json or $XDG_CONFIG_HOME/glowm/config.json
  • Windows: %AppData%\\glowm\\config.json

Example:

{
  "pager": {
    "mode": "vim"
  }
}

Requirements

  • Go, when installing from source
  • Chrome or Chromium, required for Mermaid rendering and PDF export
  • A terminal with image support for inline diagrams: iTerm2, Kitty, or Ghostty

Launch notes

Maintainers can use docs/launch-kit.md for English launch copy and docs/global-launch-checklist.md for repository metadata and posting order.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md for development notes.

Support

GitHub Sponsors

License

MIT. See LICENSE.

About

Read Markdown docs in your terminal with Mermaid diagrams rendered inline (iTerm2/Kitty/Ghostty). PDF export, pager, and STDIN support.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors

Languages