Check CLI --help Before Reading Source Code

lesson tools active tools/check-cli---help-before-readin.md View on GitHub

Check CLI --help Before Reading Source Code

Rule

Before examining source code or making assumptions about a CLI tool's capabilities, run the command with --help to discover available options, subcommands, and flags that can simplify your approach.

Context

When encountering a new command-line tool or unfamiliar command, developers often jump directly to reading source code or making assumptions about functionality. This premature deep-dive wastes time and may miss built-in features that solve the problem more elegantly.

Detection

Pattern

  1. Run <command> --help first to see top-level options and subcommands
  2. For subcommands, run <command> <subcommand> --help to discover specific flags
  3. Look specifically for utility flags like --dry-run, --status, --format, --verbose
  4. Only dive into source code after understanding the documented interface

Example: Running uv run python3 -m ace.curator generate --help revealed --dry-run option, enabling safe testing without API calls instead of building a complex validation workaround.

Outcome

Related

Match Keywords

examine source code to understand CLI planning complex workaround making assumptions about CLI options unfamiliar command usage discover CLI flags and options