GLOWTest Tagline
Tutorial

Getting Started

Installation and basic usage


Overview
Glow: Getting Started Workflow Start Choose install method? Homebrew Go install Binary Install via Homebrew brew install glow Install via Go go install glow Download binary github.com/charmbracelet Verify installation glow --version How to render markdown? File path Browse dir stdin Render a file glow README.md Launch file browser glow . Pipe to Glow cat file.md | glow - Markdown rendered!

This page walks you through installing Glow and rendering your first markdown file directly in the terminal. Whether you're previewing a README.md, reading documentation offline, or just tired of opening a browser to view formatted markdown, Glow gives you a fast, styled, keyboard-driven experience without leaving the command line. By the end of this tutorial, you'll have Glow installed, know how to render files and URLs, and be ready to explore its interactive browser.


Prerequisites

Before you begin, make sure you have the following:

  • A Unix-like terminal (macOS, Linux, or Windows Subsystem for Linux)
  • One of the following package managers or tools available:
    • Homebrew (macOS/Linux)
    • Scoop (Windows)
    • Go toolchain (1.18 or later, for installing from source)
    • Or a package manager such as apt, yum, or pacman if your distribution packages Glow
  • Basic familiarity with running commands in a terminal
  • At least one markdown file (.md) to render, or a public URL pointing to raw markdown

Quick start

Get up and running in four steps:

  1. Install Glow using your preferred package manager:
    brew install glow
    
  2. Verify the installation by checking the version:
    glow --version
    
  3. Render a local markdown file:
    glow README.md
    
  4. Launch the interactive file browser to explore markdown files in the current directory:
    glow
    

If you see styled, formatted output in your terminal after step 3, you're all set.


Steps

Step 1 — Install Glow

Choose the installation method that matches your environment.

macOS or Linux (Homebrew):

brew install glow

Windows (Scoop):

scoop install glow

From source (requires Go 1.18+):

go install github.com/charmbracelet/glow@latest

Debian/Ubuntu (apt):

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install glow

✅ Success looks like: The installation completes without errors and the glow binary is available in your PATH.


Step 2 — Verify the installation

Confirm Glow is correctly installed:

glow --version

✅ Success looks like: A version string is printed, for example glow version 1.x.x.


Step 3 — Render a local markdown file

Pass any markdown file as an argument to render it with styling:

glow path/to/your-file.md

Glow reads the file, applies its default style, and prints the formatted output to your terminal. Long documents automatically open in a pager so you can scroll through content with familiar keyboard shortcuts (↑/↓ or j/k to scroll, q to quit).

✅ Success looks like: Your markdown renders with headings, bold text, code blocks, and other formatting clearly distinguished — no raw # symbols or ** asterisks visible.


Step 4 — Render a remote markdown URL

Glow can fetch and render markdown from a URL, which is useful for reading GitHub READMEs or documentation without a browser:

glow https://raw.githubusercontent.com/charmbracelet/glow/master/README.md

✅ Success looks like: The remote markdown content appears styled in your terminal, just as a local file would.


Step 5 — Browse files interactively

Running glow without any arguments launches the terminal UI (TUI), which lets you browse markdown files in the current directory and your stash:

glow

Use the following keyboard shortcuts to navigate:

KeyAction
↑ / ↓ or j / kMove between files
EnterOpen and render the selected file
Esc or qGo back / quit
/Filter/search files

✅ Success looks like: An interactive list of .md files appears, and selecting one renders it immediately inside the TUI.


Examples

Render a local file

The most common use case — render a README.md in the current directory:

glow README.md

Expected output: The contents of README.md are printed to your terminal with styled headings, inline code, bold/italic text, and syntax-highlighted code blocks. The output respects your terminal width.


Render markdown from a URL

Fetch and render a raw markdown file from the web:

glow https://raw.githubusercontent.com/charmbracelet/glow/master/README.md

Expected output: Glow downloads the file and renders it identically to a local file — styled and paginated.


Pipe markdown from stdin

Glow reads from standard input, so you can pipe markdown content directly into it:

echo '# Hello, Glow!\n\nThis is **bold** and this is `code`.' | glow -

Expected output: A styled heading, bold text, and an inline code snippet appear in your terminal. This is useful for previewing dynamically generated markdown.


Control word wrap width

By default Glow wraps output to your terminal width. You can set a specific column width with the -w flag:

glow -w 60 README.md

Expected output: Text wraps at 60 characters regardless of your terminal window size — useful on wide screens or when you want consistent output.


Disable the pager

If you want output to flow directly to your terminal without pausing (for example, to pipe it elsewhere), disable the pager:

glow --pager=false README.md

Expected output: The entire rendered document prints to stdout immediately, without entering an interactive pager.


Troubleshooting

glow: command not found

Symptom: Running glow returns a "command not found" error immediately after installation.

Likely cause: The directory where Glow was installed is not in your shell's PATH. This commonly happens with Go installs (~/go/bin) or Homebrew on Apple Silicon (/opt/homebrew/bin).

Fix: Add the appropriate directory to your PATH. For Go installs, add this to your shell profile (.bashrc, .zshrc, etc.):

export PATH="$PATH:$(go env GOPATH)/bin"

Then reload your shell:

source ~/.zshrc  # or ~/.bashrc

Output appears as raw, unstyled text

Symptom: Glow runs but prints plain markdown source instead of formatted output (you see ##, **, backticks, etc.).

Likely cause: Your terminal does not support ANSI color codes or the output is being redirected to a file or pipe, which causes Glow to disable styling automatically.

Fix: Ensure you are running Glow in an interactive terminal that supports color. If you are redirecting output intentionally and still want styling, check Glow's --style and related flags. For most users, running the command directly in a supported terminal (iTerm2, GNOME Terminal, Windows Terminal, Alacritty, etc.) resolves this.


Error: could not read file or no such file or directory

Symptom: Glow exits with an error saying it cannot find or read the specified file.

Likely cause: The file path you provided is incorrect, the file does not exist at that location, or you have a typo in the filename.

Fix: Verify the file path:

ls -l path/to/your-file.md

Use tab completion in your shell to avoid typos, or run glow with no arguments to use the interactive browser and navigate to the file visually.


URL rendering fails or returns an error

Symptom: Running glow <url> exits with a network error or returns garbled content.

Likely cause 1: The URL points to an HTML page (e.g., a GitHub file view page) rather than raw markdown content.

Fix: Make sure the URL points directly to the raw markdown. On GitHub, click the Raw button and use that URL (it will contain raw.githubusercontent.com).

Likely cause 2: You are behind a proxy or have no internet connection.

Fix: Check your network connection and ensure any required proxy environment variables (HTTP_PROXY, HTTPS_PROXY) are set correctly in your shell.


Interactive TUI shows no files

Symptom: Running glow without arguments opens the TUI but the file list is empty.

Likely cause: There are no .md files in the current directory or its immediate subdirectories.

Fix: Navigate to a directory that contains markdown files before running glow, or pass a file path directly:

cd ~/projects/my-docs
glow