Install
install
Install plans: propose an official install command, run only on confirm.
This module NEVER installs silently. install_command only describes the
official command for a known tool; run_install executes it strictly when
the caller opts in with confirm=True. The default path is a dry-run that
echoes the command it would run — honouring the
no-system-install-without-authorization posture.
InstallPlan
Bases: BaseModel
A proposed install command for a single tool — description only.
Building a plan runs nothing. argv is the program + arguments executed
as a bare exec (NO shell). fetch_url, when set, marks a script-installer
plan (e.g. the uv curl | sh recipe): instead of a shell pipe, the script
is downloaded to a temp file and run as sh <tmpfile> — both steps are
argv execs, never shell=True. human_command is the copy-pasteable
form a human would type.
Source code in packages/axm-doctor/src/axm_doctor/install.py
InstallResult
Bases: BaseModel
Outcome of :func:run_install.
On a dry-run (confirm=False) executed is False, returncode is
None, and post_check is None — nothing was installed, so nothing is
re-detected. On a confirmed run, post_check carries the re-detected
:class:~axm_doctor.detect.ToolStatus.
Source code in packages/axm-doctor/src/axm_doctor/install.py
install_command(tool)
Return the official :class:InstallPlan for tool, or None.
Runs nothing. An unknown tool returns None rather than guessing a command.
Source code in packages/axm-doctor/src/axm_doctor/install.py
run_install(plan, *, confirm=False)
Execute plan only when confirm is True; otherwise dry-run.
With the default confirm=False this NEVER installs: it returns the
command it would run with executed=False and returncode=None.
With confirm=True it runs the command, then re-detects the tool via
:func:~axm_doctor.detect.detect_tool and reports the post-install state.