Skip to content

Guide · Open source

How to use glow: read Markdown files in your terminal

Updated · written with AI from the project's own documentation and checked against our catalogue data

Glow is a command-line tool that renders Markdown files in your terminal with formatting, instead of showing raw text. This guide explains how to install it, open local and remote Markdown files, browse a folder or Git repository, and adjust its output with flags and a config file.

Glowcharmbracelet/glow · ★ 27.9k · MIT

Quick start

  1. 1Install glow. Run brew install glow on macOS or Linux, or use one of the package-manager commands in the README.
  2. 2Check the help. Run glow --help to see the available options on your version.
  3. 3Open a file. Run glow README.md to render a Markdown file in your terminal.
  4. 4Browse a folder or repo. Run glow with no arguments to open the TUI and find Markdown files in the current directory or Git repository.
  5. 5Adjust output. Use -w to set wrap width and -s to choose a dark or light style.
  6. 6Save defaults. Run glow config to edit your config file so you do not need to repeat flags.

Install glow

The simplest route on macOS or Linux is Homebrew. The README also lists package-manager commands for other systems, including MacPorts, pacman, Chocolatey, Scoop, Winget, Snap, and apt and yum repositories set up by Charm.

If you have Go installed, you can install glow with the go tool instead. The README notes that building from source requires Go 1.21 or newer.

  • Download a binary from the releases page for macOS, Linux, Windows, FreeBSD, or OpenBSD
  • ARM builds are available for macOS, Linux, FreeBSD, and OpenBSD
# macOS or Linux brew install glow go install charm.land/glow/v3@latest

Read a Markdown file

Pass a Markdown file as the main argument to render it in the terminal. Glow also accepts input from standard input: use a dash as the argument and pipe text into it.

You can also fetch a Markdown file directly from GitHub, GitLab, or an HTTP address, without downloading it first.

# Read from file glow README.md # Read from stdin echo "[Glow](https://github.com/charmbracelet/glow)" | glow - # Fetch README from GitHub / GitLab glow github.com/charmbracelet/glow # Fetch markdown from HTTP glow https://host.tld/file.md

Browse Markdown files with the TUI

Run glow with no arguments to start its textual user interface. It finds Markdown files in the current directory and below, or searches the whole repository if you are inside a Git repository.

Files open in glow's pager, which the README describes as working much like less. Most keystrokes you know from less work the same way, and pressing ? lists the hotkeys.

glow

Adjust width, paging and style

Use the -w flag to wrap output at a maximum width. Use the -p flag to show output in a pager; if $PAGER is not set, glow defaults to less -r.

For colors, use the -s flag with dark or light. If you give no style flag, glow tries to detect your terminal background and picks dark or light for you. You can also pass a custom JSON stylesheet. The README links to the Glamour style gallery for more styles.

  • -w 60 wraps output at 60 columns
  • -s dark or -s light sets the style
  • -s mystyle.json loads a custom JSON stylesheet
  • glow --help lists further options
glow -w 60 glow -s [dark|light] glow -s mystyle.json glow --help

Save your defaults in a config file

If you repeat the same flags, create a config file. Running glow config opens it in your $EDITOR. You can also create a file named glow.yml in your platform's default config path; run glow --help to find that location.

The README example sets options such as style, mouse, pager, width, all, showLineNumbers, and preserveNewLines. Mouse support and line numbers apply to TUI mode only, according to the comments in the example.

style: "light" mouse: true pager: true width: 80 all: false showLineNumbers: false preserveNewLines: false

What people use it for

  • Reading a project's README or docs without leaving the shell
  • Piping generated Markdown from another command into glow to read it formatted
  • Fetching a remote README from GitHub or GitLab to skim it quickly
  • Browsing all Markdown files in a Git repository from one TUI session

Frequently asked questions

Is glow free to use?

Yes. The project is released under the MIT licence, as stated in the README. You can read the full licence text in the repository's LICENSE file.

What do I need to install glow?

The source does not list prerequisites for the package-manager installs. For the go install route and for building from source, the README says you need Go, and building from source requires Go 1.21 or newer.

Can glow edit Markdown files?

No. The README describes glow only for reading and rendering Markdown. It does not mention editing.

Can glow convert Markdown to PDF or HTML?

The README does not mention converting Markdown to other formats such as PDF or HTML, so do not expect that feature from this source.

Does glow work on Windows?

Yes, the README lists Windows as a platform with binaries, and gives Chocolatey, Scoop, and Winget install commands.

What are alternatives to glow?

The project's comparable tools are mdcat, bat, frogmouth, and lowdown. Choose based on whether you want a viewer, a syntax highlighter, or another terminal Markdown tool.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Glow suits developers and command-line users who read READMEs and documentation in the terminal and want to browse Markdown across a folder or Git repo. If you need to edit Markdown, want a graphical viewer, or need to convert documents to PDF or HTML, look at other tools.

Install options & downloads