CLI Reference
Commands, flags, and exit codes for the docker-doctor CLI.
On this page
Default scan command
npx @docker-doctor/cli@latest [dir][dir] is the directory to scan and defaults to ..
| Flag | Alias | Description |
|---|---|---|
--verbose | -v | Show the affected file, line, an explanation, and a Help: fix hint for every diagnostic |
--score | -s | Print only the numeric health score |
--json | -j | Output the full report as JSON |
--config <path> | -c | Use a custom config file path |
--version | -V | Print the CLI version |
Piped / CI output
--score and --json both suppress the interactive spinner and prompts, so they're safe to pipe or run in CI:
npx @docker-doctor/cli@latest . --scorenpx @docker-doctor/cli@latest . --json > report.jsonExit codes
| Mode | Exit code |
|---|---|
| Default scan | Non-zero if any error-severity diagnostic is present |
--score | Non-zero if the score is below 50 |
--json | Non-zero if any error-severity diagnostic is present |
Install for agents
Install the Docker Doctor agent skill for your coding agents (interactive multi-select in a TTY):
npx @docker-doctor/cli@latest installNon-interactive runs must name the agents:
npx @docker-doctor/cli@latest install --agent claude-code cursorSee the Coding Agents guide for details.
Rules subcommands
List every built-in rule, its category, default severity, and description:
npx @docker-doctor/cli@latest rules listExplain a single rule and its fix in detail (requires the full rule key):
npx @docker-doctor/cli@latest rules explain docker-doctor/no-root-userInteractive mode
When run in a TTY without --score or --json, docker-doctor shows a spinner while scanning and, after printing results, offers to scaffold a .github/workflows/docker-doctor.yml CI workflow for you.
If the scan found issues, it then offers to hand them to a coding agent detected on your machine — launching the agent with the issues as its prompt — or to copy that prompt to your clipboard. See the Coding Agents guide.