issue_tree
    Preparing search index...

    Function intent

    • Pre-detect a --help / -h / --version / -V request in argv, plus the first recognized subcommand if any. Runs before parseCommand so the help/version intents short-circuit without going through the option parser (which would reject --help as an unknown option in every subcommand).

      The "first recognized subcommand wins" rule means issue_tree bogus --help resolves to top-level help (the bad subcommand is ignored when help is requested), while issue_tree scan --help resolves to scan-specific help.

      --version / -V outrank --help / -h when both appear in the same argv, matching the de-facto convention of every major CLI.

      Parameters

      • argv: string[]

        arguments after the node/script entries

      Returns CliIntent

      the user's intent

      intent(['--help'])              // => { kind: 'help', subcommand: undefined }
      intent(['scan', '--help']) // => { kind: 'help', subcommand: 'scan' }
      intent(['--version']) // => { kind: 'version' }
      intent(['render', '--out', 'g.svg']) // => { kind: 'run' }