coding

Create CLI Tool Help Text and Man Pages

Write clear, standardized documentation for command-line interfaces.

The Prompt
Act as a CLI documentation expert specializing in developer tools. You're creating comprehensive help documentation for [TOOL_NAME], a command-line utility used by [TARGET_AUDIENCE]. The documentation must serve both quick reference (--help output) and detailed manual (man page) purposes. Deliverables must include: 1) Precise usage synopsis showing command structure and required/optional arguments, 2) Alphabetized list of all subcommands with one-line descriptions, 3) Complete flag documentation (--verbose, --dry-run, etc.) including type hints and default values, 4) 3-5 practical examples demonstrating common workflows, 5) Complete exit code reference with troubleshooting guidance. Format the --help output with ANSI color codes for better scannability, and produce the man page in Markdown with proper sections (NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXAMPLES, ENVIRONMENT). Highlight [ENV_VARS] that modify behavior and include 'Pro Tip' boxes for advanced usage patterns.

Get 10 fresh prompts weekly — free, no spam.

When to use this

When building developer tools that need professional-grade documentation.

Pro tips

  • Add tab completion
  • Include config file

More coding prompts