meta_package_manager.cli_explore module

The explore subcommands: the read-only queries and inspection tools.

managers, installed, outdated, orphans, search, which and config-template, plus the query plumbing they share: the concurrent collect prelude, the row builders and the query-match highlighter. Every command here only reads system state and renders a table (or its serialized counterpart).

The mpm group itself, and the plumbing shared with the other subcommand modules, live in meta_package_manager.cli.

Todo

Fold search’s --extended/--id-name-only and --exact/--fuzzy pair into a single --search-strategy=[exact, fuzzy, extended] option, whose help spells out what each strategy does. exact is case-sensitive and keeps every non-alphanumeric character. fuzzy lowercases the query, strips it of non-alphanumeric characters and tokenizes it, so word order stops mattering. extended is fuzzy widened past the package ID and name, reaching the description and whatever other metadata each manager supports.

The strategies sketched out were:

  1. strict: --exact, on ID or name.

  2. substring: regex, case-insensitive, no splitting.

  3. fuzzy: token-based.

  4. extended: fuzzy plus metadata.

meta_package_manager.cli_explore.MANAGER_VIEWS: Final[tuple[str, ...]] = ('detected', 'supported', 'all')

How much of the manager pool mpm managers reports, widest last.

Three nested sets: the managers detected on the system, then those this platform supports whether or not their CLI was found, then every manager mpm implements (unsupported and unmaintained ones included). Each maps onto the pool’s own selection knobs rather than filtering after the fact, so the views are the drop_not_found and keep_unmaintained combinations named.

Unrelated to meta_package_manager.manager.ManagerScope, which is about the filesystem a manager operates on: hence view rather than scope.

meta_package_manager.cli_explore.exact_match_option(f)

--exact refinement of the optional positional QUERY of installed and outdated.