What is manfzf?

manfzf is an interactive Python tool that lets you fuzzy search every man page on your system, preview them live, and “zoom in” on related topics—all from the terminal.
It’s designed for shell nerds, sysadmins, and anyone who wants to explore Unix docs, not just look up one thing.


Quick Start

🔗 View manfzf on GitHub

Note: you will need to install fzf if you don’t already have it, with something like sudo apt install fzf


Features

  • Fuzzy search all installed man pages with fzf
  • Live preview of the first 80 lines as you browse
  • Keyboard controls: [ENTER] to open, Ctrl-A to jump into apropos for the current topic, Ctrl-B to back up
  • Stack-based navigation (like breadcrumbs for your research rabbit holes)
  • Dracula-inspired color theme for preview and selection
  • Python 3, no dependencies except fzf and man
  • Fast and minimal—just drop in and run

Why did I write this?

fzf is an amazing tool. It didn’t take long for the idea to dawn on me, why not a high tech new interface for man, man -k and apropos. I spend a lot of time in man pages but they have never been particularly friendly to browse and explore.

manfzf solves this by showing a preview of the selected man page and offers the ability to “zoom in” and “zoom out” using apropos to find related man pages. Plus you get the ability to do fuzzy searches across the entire collection. I plan on improving it further but it is extremely useful to me already.


Usage

python3 manfzf.py           # Fuzzy search everything (default)
python3 manfzf.py awk       # Start by searching for 'awk'

Type to filter,

  • [ENTER] to view a manpage.
  • [Ctrl-A] runs apropos for your current selection (zoom deeper).
  • [Ctrl-B] goes back one search context.
  • [ESC] or no selection exits.

Sample Output

manfzf


Future direction and man2pdf

I plan to add a routine to render a selected man page as a pdf. Since I haven’t gotten around to integrating it into manfzf yet, I will instead share my man2pdf functions here. Just add these to your shell startup (e.g., .bashrc, .zshrc) and reload (open a new tab, source .bashrc).

macOS

The mac version makes use of Preview to render the postscript out of man -t into pdf.

# Convert man page to PDF (macOS only)
man2pdf() {
  man -t "$1" | open -f -a /Applications/Preview.app
}

Linux

On Linux, you will first need to install Ghostscript, which provides ps2pdf using your distro’s package manager (e.g., sudo apt install ghostscript)

man2pdf() {
  local page="${1:?Usage: man2pdf <manpage>}"
  local tmpfile
  tmpfile="$(mktemp --suffix=.pdf /tmp/man2pdf-XXXXXX.pdf)"

  # Convert manpage to PDF
  man -t "$page" | ps2pdf - "$tmpfile"
  # Open the PDF using xdg-open (works on most desktops)
  xdg-open "$tmpfile" >/dev/null 2>&1 &
}

I’ll eventually add this to manfzf, but in the meantime, I hope you enjoyed this loot-filled sidequest!

Conclusion

With manfzf on your system, you too can RTFM with style!