LinuxCommandLibrary

help2man

generates man pages from program --help and --version output

TLDR

Generate man page

$ help2man [program] > [program.1]
copy
Specify section
$ help2man -s [1] [program] > [program.1]
copy
Add name description
$ help2man -n "program description" [program] > [program.1]
copy
Include additional text
$ help2man --include [extra.h2m] [program] > [program.1]
copy

SYNOPSIS

help2man [options] executable

DESCRIPTION

help2man generates man pages from program --help and --version output. It creates basic documentation automatically from existing help text.
The tool produces minimal man pages suitable for programs with standard help output. Additional content can be included via include files.

PARAMETERS

EXECUTABLE

Program to document.
-n, --name STRING
Name description.
-s, --section NUM
Man page section.
-i, --include FILE
Include extra material.
-N, --no-info
Omit info pointer.
-o, --output FILE
Output file.
--help
Display help information.

CAVEATS

Output quality depends on --help format. May need manual editing. Best with GNU-style help.

HISTORY

help2man was created by Brendan O'Dea as part of the GNU project to automate man page generation.

SEE ALSO

man(1), pod2man(1), ronn(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community