Skip to main content

Module cli

Module cli 

Source
Expand description

Argument parsing for the dispatcher’s meta-command surface only.

Plugin args are passed through verbatim; clap is not used to validate plugin args. The dispatcher recognizes:

  • --help, -h
  • --version, -V
  • --list (with optional --all)
  • Global flags that adjust the env contract: --quiet, --verbose, --json, --color <auto|always|never>. These are consumed by the dispatcher only if they appear before the subcommand name; once a subcommand is identified, all subsequent args go to the plugin.

This is similar to how cargo and git parse their meta flags.

Structs§

GlobalFlags
Global flags consumed by the dispatcher.

Enums§

ParsedArgs
Result of parsing the dispatcher’s meta command line.

Functions§

parse
Parse the dispatcher’s meta-command surface from args.