1
0
mirror of https://github.com/jbranchaud/til synced 2026-07-05 17:00:17 +00:00
Files
til/workflow/view-nicely-formatted-markdown-from-terminal.md
T
2026-05-02 12:37:50 -05:00

1.3 KiB

View Nicely Formatted Markdown From Terminal

The glow utility is CLI markdown renderer written in Go. It is part of the CCU (charmbraclet CLI universe). And yes, I just made up CCU.

glow is great because it processes and outputs a markdown file with some styling tailored to a terminal including:

  • colors to emphasize things like headings
  • styling of inline code snippets
  • syntax highlighting for fenced code blocks
  • rendering of markdown tables
  • and a lot more that I'm not thinking to mention

In the past I've installed this with brew, but I currently manage my glow install with this mise config.

To view a nicely rendered markdown file, I can run:

$ glow README.md

For long markdown files like this README.md, this doesn't work too well because it renders until the end and spits you at at the bottom.

Fortunately, glow has a built-in pager that maintains all the styling while allowing you to navigate and search similar to less.

$ glow -p README.md

There is also a TUI version (-t), but I find that less intuitive and useful than the pager.

See glow --help for more details.