StackPanel

stack doctor

Report drift, failing checks and pending offers without changing anything

stack doctor

Diagnose the project and print a report. Nothing is written, nothing is prompted. Think terraform plan: it is exactly the report stack setup shows before asking to apply.

The report has one section per reconciler:

SectionWhat it observes
codegenHost-side generated artifacts (env payloads, manifests) that would be rewritten
filesGenerated files whose content drifted from stackpanel.files.entries, and stale files left by the previous generation
fileopsAdopted whole files, managed blocks, and path-owned keys inside JSON/YAML/TOML documents, including plan-time collisions between modules
checksstackpanel.doctor checks: runtime and repo scope run every time; build scope is listed, and realized with --build
addonsAdoption offers you have not decided on yet

Run inside the devshell for the full report. Outside it, only the sections that do not need the evaluated config can run, and the report says so.

Exit status

1 when any error-severity finding is present: a critical check failed, a file could not be adopted (adopt = "refuse"), or a reconciler could not diagnose. 0 otherwise, even with pending changes - pending changes are applied by stack setup, they are not a doctor failure.

Usage

stack doctor                  # full report
stack doctor --json           # machine-readable report
stack doctor --only files     # just generated-file drift
stack doctor --skip checks    # everything but the checks
stack doctor --build          # also realize build-scope checks with nix

Flags

FlagTypeDefaultDescription
--jsonboolfalsePrint the report as JSON
--onlystringsnoneRun only these reconcilers (repeatable)
--skipstringsnoneSkip these reconcilers (repeatable)
--buildboolfalseRealize build-scope doctor checks with nix build

Global Flags

These flags are inherited from parent commands.

FlagTypeDefaultDescription
--daemon, -dboolfalseRun in daemon mode (no TUI, for background processes)
--no-colorboolfalseDisable color output
--no-tuiboolfalseDisable interactive TUI mode
--verbose, -vboolfalseEnable verbose output

On this page