Configuration
Customizing Glow settings and themes
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.
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:
$EDITORenvironment variable set if you want Glow to open your config in your preferred editor
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.
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.
| Option | Default | Valid Values | Effect |
|---|---|---|---|
style | "auto" | "auto", "dark", "light", or a path to a custom JSON style file | Controls the color theme used when rendering markdown. "auto" detects your terminal background. |
mouse | false | true, false | Enables mouse support in the interactive TUI pager, allowing scroll-by-click. |
pager | false | true, false | When true, always pipes rendered output through the built-in pager, even for short files. |
width | 80 | Any positive integer, or 0 for terminal width | Sets 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.
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:
| Key | Action |
|---|---|
j / ↓ | Scroll down one line |
k / ↑ | Scroll up one line |
Space / f | Page down |
b | Page up |
g | Jump to top |
G | Jump to bottom |
q | Quit |
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
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.
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/COLORTERMenvironment variables are not set correctly. Alternatively,style: nottymay be set in your config. - Fix: Check your terminal's color support with
echo $TERMandecho $COLORTERM. For full color, you want values likexterm-256colorortruecolor. Update your terminal emulator settings or shell profile accordingly. Also verify yourglow.ymldoes not havestyle: notty.
Config file changes have no effect
- Symptom: You edited
glow.ymlbut Glow still behaves the same way. - Likely cause: Glow is reading a different config file, or an environment variable like
GLOW_STYLEis overriding your file. - Fix: Run
glow configto confirm which file is being edited. Check your shell environment for anyGLOW_*variables withenv | grep GLOW. Remove or unset any that conflict.
glow config opens the wrong editor
- Symptom: Running
glow configopens an editor you don't use. - Likely cause:
$EDITORis unset or points to an unexpected binary. - Fix: Set
$EDITORin your shell profile (e.g.,export EDITOR=nvimin~/.zshrcor~/.bashrc), then reload your shell withsource ~/.zshrc.
Text wraps too early or too late
- Symptom: Rendered output wraps at an unexpected column, making text hard to read.
- Likely cause: The
widthsetting inglow.ymldoes not match your typical terminal width, or--widthwas set in a shell alias. - Fix: Update the
widthvalue in your config file to match your preferred terminal width. Set it to0to 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
qto exit. - Likely cause:
pager: trueis set in yourglow.yml. - Fix: Set
pager: falsein your config and use the--pagerflag 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
--styleflag 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 withcat mytheme.json | python3 -m json.tool. Correct any errors and retry.