GLOWTest Tagline
Guide

Configuration

Customizing Glow settings and themes


Overview

This page walks you through customizing Glow to match your workflow and visual preferences. You'll learn how to configure persistent settings, choose or build themes, and tune rendering behavior so every markdown file looks exactly how you want it in the terminal. Getting your configuration right saves time — instead of passing flags on every invocation, Glow reads your preferences automatically on startup.


Prerequisites

Before diving into configuration, make sure you have the following in place:

  • Glow installed on your system (see the Installation guide if you haven't done this yet)
  • A terminal emulator with 256-color or true-color support for theme colors to render correctly
  • Basic familiarity with editing configuration files (YAML or TOML syntax)
  • Optional: $EDITOR environment variable set if you want Glow to open your config in your preferred editor

Installation

If you haven't installed Glow yet, choose the method that matches your system.

1. macOS via Homebrew

brew install glow

2. Linux via Snap

sudo snap install glow

3. Linux via package manager (Debian/Ubuntu)

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.debian.list
sudo apt update && sudo apt install glow

4. Using Go (any platform)

go install github.com/charmbracelet/glow@latest

5. Verify your installation

glow --version

You should see the installed version printed to stdout. Once confirmed, Glow is ready to configure.


Configuration

Glow stores its persistent configuration in a YAML file. On first run, Glow creates this file automatically at the platform-appropriate config path:

  • Linux/macOS: ~/.config/glow/glow.yml
  • Windows: %APPDATA%\glow\glow.yml

You can also set GLOW_CONFIG as an environment variable to point at a custom path.


Opening Your Config File

glow config

This opens your configuration file in $EDITOR. If $EDITOR is not set, Glow falls back to your system default.


Configuration Options

Below are the key fields you can set. Each entry shows the option name, its default, valid values, and what it controls.

OptionDefaultValid ValuesEffect
style"auto""auto", "dark", "light", or a path to a custom JSON style fileControls the color theme used when rendering markdown. "auto" detects your terminal background.
mousefalsetrue, falseEnables mouse support in the interactive TUI pager, allowing scroll-by-click.
pagerfalsetrue, falseWhen true, always pipes rendered output through the built-in pager, even for short files.
width80Any positive integer, or 0 for terminal widthSets the maximum column width for word-wrapped output. Narrower widths improve readability on wide monitors.

A minimal config file looks like this:

# ~/.config/glow/glow.yml
style: "dark"
mouse: true
pager: true
width: 100

Styles and Themes

Glow's rendering styles are defined as JSON files based on the Glamour library's theme format. You can reference a built-in theme name or supply a path to your own:

style: "/home/yourname/.config/glow/mytheme.json"

Built-in named styles include dark, light, notty (no styling, plain text output), dracula, and tokyo-night, among others. Using "auto" lets Glow select between dark and light based on your terminal's background color hint.


Environment Variable Overrides

Any config value can be overridden at runtime with an environment variable using the GLOW_ prefix and the option name uppercased:

GLOW_STYLE=light glow README.md
GLOW_WIDTH=120 glow notes.md

This is useful in scripts or CI pipelines where you want reproducible output without modifying your personal config.


Usage

Once your configuration file is in place, Glow automatically applies your settings on every run — no extra flags needed.


Rendering a File with Your Saved Style

Your configured style and width apply automatically:

glow README.md

Overriding Style on the Fly

When you need a different look for a single session, pass the --style flag to override your config temporarily:

glow --style light README.md

This does not modify your config file.


Controlling Word Wrap Width

Set a custom wrap width per invocation with --width:

glow --width 60 notes.md

A smaller width is helpful when you're working in a split terminal pane.


Using the Pager

If pager: false is your default but you want paged output for a long document:

glow --pager CHANGELOG.md

Inside the pager, use standard keyboard shortcuts:

KeyAction
j / Scroll down one line
k / Scroll up one line
Space / fPage down
bPage up
gJump to top
GJump to bottom
qQuit

Browsing Files Interactively

Launch the interactive TUI to browse markdown files in the current directory:

glow

In this mode, your mouse and style settings take effect. Use arrow keys to navigate, Enter to open a file, and Esc or q to go back.


Rendering a Remote URL

Your configured style applies to remote content too:

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

Examples

Each example below is runnable as-is. Copy and paste into your terminal.


Render a local file using your configured defaults

glow ~/docs/project-overview.md

Expected output: Your markdown file rendered in the terminal with your configured style, width, and paging preference applied. Headers, bold text, code blocks, and lists are all styled according to your theme.


Force plain, unstyled output (useful for piping)

glow --style notty api-reference.md

Expected output: Markdown rendered as plain text with no ANSI color codes — safe to pipe into grep, less, or other tools.


Set a custom width and enable pager in one command

glow --width 72 --pager CONTRIBUTING.md

Expected output: The file renders at 72 columns and opens inside Glow's built-in pager. Press q to exit.


Use a custom theme file

First, save a Glamour-compatible JSON theme to ~/.config/glow/mytheme.json, then:

glow --style ~/.config/glow/mytheme.json README.md

Expected output: Your markdown renders with the colors and typography defined in your custom JSON theme.


Override style via environment variable in a script

export GLOW_STYLE=light
export GLOW_WIDTH=100
glow release-notes.md

Expected output: Glow renders in light mode at 100 columns regardless of what your glow.yml specifies. Useful in CI or shared script environments.


Open config file directly for editing

glow config

Expected output: Your glow.yml opens in $EDITOR. Save and exit to apply changes on the next invocation.


Troubleshooting

Use the format below to diagnose and fix common configuration issues.


Colors not rendering / output looks plain

  • Symptom: Glow output shows no colors or styling, just plain text.
  • Likely cause: Your terminal does not support 256 colors, or TERM / COLORTERM environment variables are not set correctly. Alternatively, style: notty may be set in your config.
  • Fix: Check your terminal's color support with echo $TERM and echo $COLORTERM. For full color, you want values like xterm-256color or truecolor. Update your terminal emulator settings or shell profile accordingly. Also verify your glow.yml does not have style: notty.

Config file changes have no effect

  • Symptom: You edited glow.yml but Glow still behaves the same way.
  • Likely cause: Glow is reading a different config file, or an environment variable like GLOW_STYLE is overriding your file.
  • Fix: Run glow config to confirm which file is being edited. Check your shell environment for any GLOW_* variables with env | grep GLOW. Remove or unset any that conflict.

glow config opens the wrong editor

  • Symptom: Running glow config opens an editor you don't use.
  • Likely cause: $EDITOR is unset or points to an unexpected binary.
  • Fix: Set $EDITOR in your shell profile (e.g., export EDITOR=nvim in ~/.zshrc or ~/.bashrc), then reload your shell with source ~/.zshrc.

Text wraps too early or too late

  • Symptom: Rendered output wraps at an unexpected column, making text hard to read.
  • Likely cause: The width setting in glow.yml does not match your typical terminal width, or --width was set in a shell alias.
  • Fix: Update the width value in your config file to match your preferred terminal width. Set it to 0 to always use the full terminal width dynamically.

Pager opens for every file even for short content

  • Symptom: Even one-line markdown files open in the pager, requiring you to press q to exit.
  • Likely cause: pager: true is set in your glow.yml.
  • Fix: Set pager: false in your config and use the --pager flag only when you explicitly want paged output.

Custom theme JSON not loading

  • Symptom: Glow ignores your custom theme and falls back to a default style.
  • Likely cause: The path in your config or --style flag is incorrect, or the JSON file has syntax errors.
  • Fix: Verify the file exists at the exact path with ls -la /path/to/mytheme.json. Validate the JSON syntax with cat mytheme.json | python3 -m json.tool. Correct any errors and retry.