Skip to content

apm doctor

Terminal window
apm doctor [--verbose]

apm doctor runs environment diagnostics and prints a pass/fail table. Use it during onboarding or as a pre-flight check when installs and marketplace operations fail unexpectedly.

The network probe runs git ls-remote against GitHub and can take up to five seconds before timing out.

CheckWhat it verifiesAffects exit code?
Gitgit --version succeeds.Yes
NetworkGit can read the HEAD ref from github.com/git/git.git.Yes
AuthenticationAPM’s credential resolver finds a token for github.com. The resolver can use environment variables, the GitHub CLI, or a git credential helper. A missing token means unauthenticated rate limits apply.No
Marketplace configThe marketplace: block in apm.yml, or legacy marketplace.yml, can be parsed when present.No
Marketplace authoringConfigured output formats, duplicate package names, and version alignment are reported when marketplace config is present.No
Executable trustIn an APM project, reports local allows overridden by organization policy and points to apm policy explain.No

The GitHub CLI is a possible credential source; apm doctor does not require it or report its installation as a separate check.

FlagDescription
-v, --verboseShow detailed diagnostic logging.
CodeMeaning
0The Git and network checks passed.
1Git is unavailable or the network probe failed.

Informational failures do not change the exit code.

Run the standard diagnostics:

Terminal window
apm doctor

Include detailed output:

Terminal window
apm doctor --verbose

Use the exit code as a basic CI pre-flight:

Terminal window
apm doctor && apm audit --ci

For project integrity and policy enforcement in CI, use apm audit --ci instead.

  • apm audit — validate lockfile, deployed content, and policy in CI.
  • apm policy — inspect organization policy and executable trust decisions.
  • Authentication — configure credentials used by APM.