| MANSPLAIN(1) | General Commands Manual | MANSPLAIN(1) |
mansplain —
generate mdoc(7) man pages from source material
mansplain |
generate [--from-help
command] [--name
name] [--section
num] [--dry-run]
[-o file]
[file | -] |
mansplain |
lint file |
- |
mansplain |
install [--dry-run]
file |
mansplain |
convert [-o
file] file |
- |
mansplain |
configure |
mansplain |
[-v] |
mansplain generates
mdoc(7) man pages
from source material. The generate command uses an
OpenAI-compatible LLM to produce man pages from
--help output, README files, config files, or any
text passed as input. The convert command
deterministically compiles
ronn-format(7)
markdown to mdoc without an LLM.
mansplain also ships as an agent skill
compatible with Claude Code, Cursor, Copilot, Gemini CLI, and other coding
agents. The skill teaches agents to write man pages directly using their own
model and project context, without requiring the
mansplain binary. Install the skill with:
npx skills add
mwunsch/mansplaingenerate
[file | -]--from-help to run a command and capture its
output, or --name to automatically run
name --help. Multiple
sources can be combined. Use --section to generate
man pages for config file formats (section 5) or conceptual overviews
(section 7).lint
file | --Tlint if available, checks for required sections
(NAME, SYNOPSIS, DESCRIPTION), and warns about missing recommended
sections (OPTIONS, EXAMPLES, EXIT STATUS, SEE ALSO).convert
file | -install
fileconfigureGlobal options:
--base-url
url--api-key
key--model
name-v,
--versionOptions for generate:
--from-help
command--name
name--help automatically.
Inferred from source content if not given.--section
num-o,
--output file--dry-runMANSPLAIN_API_KEYMANSPLAIN_BASE_URLMANSPLAIN_MODELOPENAI_API_KEYMANSPLAIN_API_KEY is not
set.XDG_CONFIG_HOMEinstall. In the default
manpath(1) on
macOS and Linux.The mansplain utility exits 0 on
success, and >0 if an error occurs.
The lint command exits 0 if the file
passes all checks, or 1 if errors are found.
Generate a man page for ripgrep:
mansplain generate --name rg -o rg.1
Generate from a README and preview:
mansplain generate README.md --name mytool | mandoc -Tutf8 | less
Pipe help output from another tool:
curl --help | mansplain generate - --name curl -o curl.1
Document a config file (section 5):
mansplain generate config.toml --name myapp.conf --section 5
Write a conceptual overview from architecture docs (section 7):
mansplain generate ARCHITECTURE.md --name myframework --section 7
Convert a ronn-format markdown file to mdoc:
mansplain convert man/tool.1.md -o man/tool.1
Generate and validate in one pipeline:
mansplain generate --name jq | mansplain lint -
See the prompt that would be sent to the LLM:
mansplain generate --dry-run --name rg
Install a man page locally:
mansplain install rg.1 man rg
apropos(1), groff(1), man(1), mandoc(1), manpath(1), whatis(1), mdoc(7), ronn-format(7)
| March 30, 2026 | mansplain v0.2.2-3-ga520a16 |