Introduce a single typer-based meta-CLI (services/cli.py) that aggregates
all service CLIs as subcommands, plus shared helpers in services/common/cli.py
(run, print_json, get_connection, mount_argparse) to eliminate duplicated
boilerplate, DB connection leaks, and raw tracebacks.
- Mount 13 legacy argparse CLIs unchanged via mount_argparse
- Migrate services/metrics/cli.py to shared helpers (DB always closed in
finally, failures routed through run() for clean Error + exit code)
- Add typer to requirements.txt and a unified-CLI smoke step to CI
- Document the meta-CLI in AGENTS.md; legacy python3 -m invocations unchanged
The doc-consistency test extracts every 'python3 -m services...' token
from AGENTS.md and asserts each resolves to a runnable module. The
literal placeholder services.X / services.X.cli matched the regex but
had no backing file, failing test_documented_service_commands_have_entry_points.
Replace with the concrete services.metrics / services.metrics.cli modules.
Summary
Verification
./scripts/verify-local-test-suite.sh: 3304 passed, 0 skipped./scripts/verify-platform.sh: 276 passedgit diff --check: passed