I'm looking for a simple CLI Markdown viewer with support for Chapter selection for Ubuntu. My main goal is to have a single file with notes separated to chapters so I can list those and select one to view that only one.

Markdown is only suppose to help with the readability and add some colors to the output; however, it might not be the best option for me, so I'm open to other ideas.

These are the ones I've tried already:

  • mdless
  • mdp
  • mad(1)
  • mdr
  • mdv

But none of these support what I'm looking for.

My formatting would look something like this:

### Chapter 1
Chap content

### Chapter 2
Chap content

I've tough about doing this in Python so I could just grep everything starting with "###" then somehow printing everything til the next triple-hash, but I'm not quite sure how to combine this with syntax highlighting and scalability.

Do someone know a way to make this work somehow?

1 Answer 1


I find glow to be pretty nice and featureful cli markdown reader that supports Chapter. Source and installation instructions for many different distributions available on github.

For 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.list.d/charm.list
sudo apt update && sudo apt install glow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.