I replaced the `man` command with a Python TUI — and it's actually useful

Published: (February 22, 2026 at 01:07 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

What it looks like

SmartMan CLI Demo

What it does differently

Featuremansmartman
Syntax highlighting
Interactive sidebar (jump to sections)
Quick‑win examples at the top
AI‑powered plain‑English explanations
Themes (Dracula, Catppuccin, Nord…)

Features I’m actually proud of

The most painful thing about man pages is that useful examples are always buried at the bottom. SmartMan surfaces the most common usage patterns as interactive cards right at the top of every page. No scrolling, no grep‑ing through the man page to find what you need.

🤖 AI Explanations (via Groq)

Staring at a complex flag description and still confused? Run:

smartman --explain awk

It hits the Groq API (sub‑second response, free tier available) and gives you a plain‑English summary of what the command actually does — no more decoding formal specification language at 2 am.

📂 Interactive Sidebar

Jump between sections instantly using keyboard shortcuts:

KeyAction
nJump to NAME
sJump to SYNOPSIS
dJump to DESCRIPTION
oJump to OPTIONS
eJump to EXAMPLES
qQuit

🎨 Theming

Built on YAML‑based themes, so you can match your exact terminal aesthetic:

  • Default — Modern dark blue
  • Dracula — Classic dev
  • Catppuccin — Pastel mocha
  • Nord — Cool‑toned frost
  • Monokai — High‑contrast vibrant

Example:

smartman --theme dracula grep

Install it in one line

curl -sSL https://raw.githubusercontent.com/ambaskaryash/smartman-cli/main/install.sh | bash

Or via pipx if you prefer:

pipx install smartman

Then, to make it your permanent default man command, add this to your .bashrc or .zshrc:

alias man='smartman'

Now every time you type man , you get the full SmartMan experience automatically.

The stack

  • Textual — The TUI framework that makes all the interactive UI possible.
  • Rich — Powers the syntax highlighting and styled rendering.
  • Groq API — For the AI explanations; chosen for its near‑zero latency.
  • Typer — Clean CLI interface with zero boilerplate.

What’s next

  • Fuzzy search across all installed man pages
  • Bookmarking frequently‑used man pages
  • --tldr mode (shorter, community‑sourced summaries)
  • Export to PDF

Try it out

The full source code is on GitHub:

👉 github.com/ambaskaryash/smartman-cli

If this saves you even a few seconds of squinting at man pages, a ⭐ on the repo would mean a lot — it helps other Linux users discover it too. Contributions are very welcome, especially new themes. Adding one is as simple as dropping a YAML file into smartman/themes/.

What’s the most annoying thing about the default man command for you? Drop it in the comments — I’m actively looking for what to build next.

0 views
Back to Blog

Related posts

Read more »

Show HN: I ported Tree-sitter to Go

This started as a hard requirement for my TUI‑based editor application, but it ended up going in a few different directions. - A suite of tools that help with s...