Skip to content

Cli

cli

axm-doctor command-line interface (cyclopts).

The CLI is a thin shell: it owns argument parsing and human-facing output but delegates every operation to the central detect/install/orchestrate functions, so no business logic is duplicated across the CLI / MCP boundary.

Two commands, two postures:

  • check — the read-only report. It prints tool presence, third-party auth state and missing (value-free) secrets, then exits 0. It NEVER installs and NEVER prompts.
  • bootstrap — the interactive path. For each absent tool it shows the official install command and installs only on an explicit y (default No, honouring the no-system-install rule); for missing secrets it offers to run vault setup. Nothing happens without a yes.

bootstrap()

Interactively install absent tools and provision secrets on confirmation.

Source code in packages/axm-doctor/src/axm_doctor/cli.py
Python
@app.command
def bootstrap() -> None:
    """Interactively install absent tools and provision secrets on confirmation."""
    try:
        _bootstrap_tools()
        _bootstrap_secrets()
    except Exception as exc:  # noqa: BLE001 # CLI boundary: any error -> exit 1
        _die(exc)

check()

Print the read-only env report and exit 0; never installs or prompts.

Source code in packages/axm-doctor/src/axm_doctor/cli.py
Python
@app.command
def check() -> None:
    """Print the read-only env report and exit 0; never installs or prompts."""
    try:
        _print_check()
    except Exception as exc:  # noqa: BLE001 # CLI boundary: any error -> exit 1
        _die(exc)

main()

Console-script entry point for axm-doctor.

Source code in packages/axm-doctor/src/axm_doctor/cli.py
Python
def main() -> None:
    """Console-script entry point for ``axm-doctor``."""
    app()