NAME

Developer::Dashboard::Pax::CLI - public PAX command facade

SYNOPSIS

use Developer::Dashboard::Pax::CLI;

exit Developer::Dashboard::Pax::CLI->run(@ARGV);

DESCRIPTION

Developer::Dashboard::Pax::CLI implements the SOW-03 public command surface for bin/pax. The only public commands are build, run, and help aliases. Older diagnostic handlers remain private implementation methods so tests and internal modules can reuse them without exposing them as user CLI commands.

PUBLIC COMMANDS

build

Reads CLI options and optional paxfile.yml defaults, then builds a standalone executable through Developer::Dashboard::Pax::StandaloneImage.

run

Uses the same build configuration path as build, then executes the resulting standalone binary with arguments after --.

PURPOSE

This module keeps the public command contract, option parsing, interpreter mode, and user-facing error handling in one place so bin/pax can stay thin.

WHY IT EXISTS

Earlier PAX revisions exposed a wide set of diagnostic subcommands directly on the CLI; SOW-03 deliberately narrowed the public surface to just build and run so the command a user types carries a small, stable contract, while every diagnostic capability that used to be a subcommand (capture, differential comparison, benchmarking, gatekeeper checks) stays reachable as a plain Perl method for tests and internal callers. This module is where that narrowing lives - it is the one place deciding which commands are public.

WHEN TO USE

Edit this file when changing build/run's option parsing, when paxfile.yml default resolution needs new fields, or when deciding whether a capability should be exposed as a new public subcommand (rare - prefer keeping it a private method other Perl code can call directly, matching SOW-03's intent).

WHAT USES IT

share/private-cli/pax (this project's staged internal pax command, reached via dashboard pax / d2 pax) dispatches directly into Developer::Dashboard::Pax::CLI->run(@ARGV); the same entrypoint is what Developer::Dashboard::PaxCache shells out to when it needs a real pax build to populate its compile cache.

EXAMPLES

Example 1:

exit Developer::Dashboard::Pax::CLI->run('build', '-o', '/tmp/app', 'bin/app.pl');

Example 2:

exit Developer::Dashboard::Pax::CLI->run('run', 'bin/app.pl', '--', '--flag', 'value');

HOW TO USE

Route all public CLI execution through run. Keep internal diagnostics and legacy helpers private to the module layer instead of reopening the public command surface.