Search

Render Markdown in the terminal elegantly

Written in Go and with several configuration options.


Render Markdown in the terminal elegantly


Glow is a terminal-based markdown file reader designed from the ground up to enhance the beauty - and power - of CLI.

Use it to discover markdown files, read documentation directly from the command line, and store markdown files in your own private collection so you can read them on the go.

By the way, all stored data is end-to-end encrypted: only you can decrypt it.


Installation

Glow is available for different operating systems and distributions Linux, see the procedure accordingly with your case:

# macOS or Linux
brew install glow

# macOS (with MacPorts)
sudo port install glow

# Arch Linux (btw)
yay -S glow

# Void Linux
xbps-install -S glow

# Nix
nix-env -iA nixpkgs.glow

# FreeBSD
pkg install glow

# solution
eopkg install glow

# Windows (with Scoop)
scoop install glow

# Android (with termux)
pkg install glow

If none of the above options are available on your system then compile using Go:

git clone https://github.com/charmbracelet/glow.git
cd glow
go build
sudo mv ~/go/bin/glow /usr/local/bin/

Usage

To display a markdown file just pass it as a parameter:

glow file.md

If you want to paginate the output use the -p parameter:

glow -p file.md

If you want to view with a larger or smaller width, enter using -w [num]:

glow -w 150 file.md

You can also view files online:

glow https://host.tld/file.md

For more information and usage tips use the glow help, output:

Render markdown on the CLI, with pizzazz!

Usage:
  glow [SOURCE|DIR] [flags]
  glow [command]

Available Commands:
  config Edit the glow config file
  help Help about any command
  stash Stash to markdown

Flags:
  -a, --all show system files and directories (TUI-mode only)
      --config string config file (default /home/marcos/.config/glow/glow.yml)
  -h, --help help for glow
  -l, --local show local files only; no network (TUI-mode only)
  -p, --pager display with pager
  -s, --style string style name or JSON path (default "auto")
  -w, --width uint word-wrap at width

Use "glow [command] --help" for more information about a command.

For more information, access the project’s repository.


markdown go


Share



Comments