Mansplain – Generate mdoc(7) man pages from –help output using LLMs

1 pointsposted 7 hours ago
by mwunsch

2 Comments

mwunsch

7 hours ago

Author here. I've been thinking about this for a bit — most modern CLI/TUI tools (especially in the AI space) don't ship man pages. The format is structurally ideal for agent consumption: standardized, terse, offline, parseable. But nobody writes them because the toolchain is hostile.

mansplain attacks this from two angles:

1. `generate` — point it at --help output, a README, or stdin and get a well-formed mdoc(7) man page via any OpenAI-compatible API.

2. `convert` — deterministic compilation of ronn-format Markdown to mdoc. Inspired by Ryan Tomayko's ronn (https://github.com/rtomayko/ronn), which I used years ago in some Ruby projects.

It also ships as an agent skill (`npx skills add mwunsch/mansplain`) — any coding agent can learn to write man pages as part of its normal workflow, no binary required. The SKILL.md is the system prompt for the CLI too, so they stay in sync.

Written in Go. Ships its own man page, generated by itself. MIT licensed.

aanet

7 hours ago

Super useful. And kudos on the pun (intended or not!)