ainfra
On this page

References

Doctor commands#

text
ainfra doctor [TARGET]
ainfra doctor all [TARGET]
ainfra doctor environment
ainfra doctor deployment [TARGET]
ainfra doctor template [LOCAL_TEMPLATE]
ainfra doctor run [TARGET]

Bare doctor is an exact alias of doctor all. The aggregate selects the applicable environment, deployment, already-resolved template, and latest-run checks. Missing optional evidence is skip, never pass.

Every finding has a stable code, scope, check ID, status, severity, message, component or path, and reconciliation state. Failed and skipped checks also provide a next action. --format json emits exactly one ainfra.result/v1 object on stdout; diagnostics and confirmation prompts do not contaminate JSON stdout.

Local reconciliation#

--reconcile can repair only registered, ainfra-owned local artifacts. The currently registered repair creates the deployment .ainfra directory or restricts it to owner-only mode (0700). It does not edit manifests, native inputs, templates, state, credentials, or remote infrastructure.

Interactive use prints the complete plan and asks for confirmation. Automation must provide all three options:

sh
ainfra doctor deployment path/to/deployment \
  --reconcile --non-interactive --yes

ainfra locks the deployment, rechecks plan preconditions, applies eligible actions, and reruns affected checks. Failed actions remain in the result as failed or still_failing; stale plans are refused before writing.

Exit codes#

CodeMeaning
0Successful command; warnings and skips may still be present.
1Operation, child-tool, rendering, or reconciliation failure.
2Invalid invocation, configuration, or input contract.
3Missing or incompatible required dependency.
4Security or trust refusal.
5Stale reviewed-plan binding (reserved for lifecycle commands).
6Interrupted or ambiguous mutation (reserved for lifecycle commands).

Machine-output schemas and examples are maintained under spec/schemas/v1/ and spec/examples/v1/machine-output/.