helmfile doctor analyzes diffs and gates high-risk changes
Introduced 2026-06-22 · score 0.95
HOW TO USE IT
Before applying planned changes, run `helmfile doctor` to review the diff; use `--output json` for a structured report. High-risk findings exit 2 unless `--force` is passed.
export HELMFILE_LLM_API_KEY="<api-key>"
export HELMFILE_LLM_MODEL="<model-id>"
helmfile doctor --output jsonhelmfile doctor --force --output jsonhelmfile doctorWHY THIS HELPS
Review planned Helmfile changes in a CI pipeline before applying them.
REQUIREMENTS AND LIMITATIONS
- Version: v1.6.0
- --output <format>: Doctor report format; `json` emits structured JSON. Default is text.
- --force: Skip the exit-2 gate when a high-severity risk is found.
- --context <N>: Diff context lines; doctor defaults to 3.
- llm.baseURL: OpenAI-compatible endpoint base URL; defaults to `https://api.openai.com/v1`.
- llm.apiKey (required): API key; required to enable LLM analysis.
- llm.model (required): Model identifier; required to enable LLM analysis.
- llm.timeout: Per-request timeout; default 60s.
- llm.maxTokens: Maximum completion tokens; default 4096.
- --llm-base-url <URL>: Set the OpenAI-compatible endpoint URL.
- --llm-api-key <key>: Set the LLM API key.
- --llm-model <id>: Set the model identifier.
- --llm-timeout <duration>: Set per-request timeout; Go duration format.
- --llm-max-tokens <N>: Set completion token cap.
- --diff-output <format>: Set helm-diff plugin output format; `--output` is reserved for doctor report format.
- --show-secrets: Ignored by doctor; secrets remain redacted.
- --suppress-secrets: Drop Secret resource structure from the diff.
- Prerequisite: LLM analysis requires `apiKey` and `model`; `baseURL` is optional. The endpoint must speak OpenAI Chat Completions protocol.
- Prerequisite: `helmfile diff` requires helm-diff plugin v2.9.0+1 or greater.
- The endpoint must be OpenAI-compatible and support Chat Completions.
- The default `--context` value is 3.
- A high risk exits with code 2 unless `--force` is passed; other errors exit with code 1.
- An LLM call failure degrades to exit code 0.
- Secrets are always redacted before any byte leaves the process; `--show-secrets` is silently ignored.
- Without LLM configuration, doctor degrades to a plain `helmfile diff` with `--show-secrets` forced off.
- Most `helmfile diff` flags are accepted for parity.
FIRST-PARTY EVIDENCE
- https://github.com/helmfile/helmfile/releases/tag/v1.6.0
- https://github.com/helmfile/helmfile/blob/v1.6.0/docs/cli.md
Check the installed version and the source before using it. Entry JSON