Glow, read and organize Markdown files from the terminal

about Glow

In the next article we are going to take a look at Glow. This is a terminal-based Markdown reader which is designed from scratch. This program can find local Markdown files, in subdirectories, or in a local Git repository.

Glow is a CLI tool that can render and read Markdown files in the Gnu/Linux terminal. It will also allow us to organize Markdown files. Keep in mind that Glow is not a Markdown editor, so we will not be able to use it to write text in this language.

Install Glow on Ubuntu

Glow can be found available for different operating systems. For Ubuntu and Debian, the creators of this program offer .DEB packages for various architectures.. These packages can be found in your release page. If you prefer to download the latest version released today of this program, you can also open a terminal (Ctrl+Alt+T) and run in it wget in the following way:

download glow deb package

wget https://github.com/charmbracelet/glow/releases/download/v1.4.1/glow_1.4.1_linux_amd64.deb

When the download is finished, it will only be necessary to use this other command to install the program:

installation of application deb package

sudo apt install ./glow_1.4.1_linux_amd64.deb

A quick look at Glow

Glow can be used in two ways: from the CLI and from his TUI.

no arguments

If we run Glow with no arguments, the Textual User Interface (TUI) will be started, and the computer will be scanned for local Markdown files.. The program will find the files in the current directory and subdirectories.

glow no arguments

From this interface, we can use the key? to list available hotkeys.

Tabs

The program has tabs. We will can move between these using the tab key.

app tabs

  • In the local tab we will see locally hosted files.
  • The stashed tab works like a bookmark. The program it will allow us to create bookmarks by pressing the ‘s’ key on the file that interests us, or while we see the content. This bookmark will be visible only in the current directory. You can press the ‘x’ key to delete the bookmark (not the file) or even add a note by pressing the ‘m’ key.
  • The news tab displays changelogs and other messages from Glow developers.

Find Markdown Files

From the TUI, we can also use the -a option to find all Markdown files in the current directory and its subdirectories.

find markdown files

glow -a

In the results we can use the arrow keys to scroll through the files on the screen. It will also allow us to use the help options that are shown at the bottom. The search option in this view will allow us to search for files by name, not by their content..

search file by name

Load one of the markdown files

The simplest use of Glow is from the CLI, and It will help us to load a Markdown file. The program will display all the rendered content on the screen. To see this, we will only need to type:

file loaded with glow

glow archivo_markdown

Locator

In the CLI we can use the locator option to display the text of one of the files. We will only have to use the -p option as follows:

glow search

glow -p archivo_markdown

In this view we will have the possibility to use the / key and then write a text to search for it in the file. You can press the ‘ keycorner‘ to get out of sight.

choose a style

From the terminal, we can also choose a style using the -s option. When no option is provided, the program tries to detect the current background color of the terminal, and automatically chooses the dark or light style.. This can be changed with the command:

glow -s [dark|light]

Help

For get more details on how to use this programhelp can be consulted with the command:

glow help

glow --help

uninstall

in case you want remove the program from your computeryou just need to open a terminal (Ctrl+Alt+T) and launch the command in it:

uninstall glow

sudo apt remove glow

Overall, Glow is a useful tool for viewing and organizing Markdown files from the terminal. Like most tools for the terminal, this one may not be to everyone’s liking. For For more information about this software or its use, users can go to its repository on GitHub.

Add Comment