Skip to main content

Module info_cmd

Module info_cmd 

Source
Expand description

Dispatcher for the greentic-pack info subcommand.

Reads a .gtpack archive, projects it into an InfoReport, and prints either a human-readable summary or a JSON document (sorted keys, pretty-printed).

Exit-code mapping (applied by run_with_cli when this dispatcher returns an error):

  • 2 — path validation failed (missing file, not a regular file, or the extension is not .gtpack).
  • 3 — strict mode requested but the pack is unsigned or its signature is invalid.
  • 1 — any other failure (archive corruption, I/O error, …).

Errors returned from this module use stable message prefixes so the caller can cheaply classify them. The prefixes come from the cli.info.error.* i18n keys (English template), which keeps the programmatic check aligned with the user-facing text.

Functions§

handle
Entry point for greentic-pack info <PATH> [--format human|json] [--strict].