Skip to content

plan

Show diff between YAML and current GitHub state. No mutations are made.

Terminal window
gh infra plan [path...]

One or more paths can be given. When multiple paths are provided, manifests from all paths are collected and planned together.

ArgumentExampleBehavior
(none) or .gh infra planAll *.yaml / *.yml in the current directory
Filegh infra plan repos/my-cli.yamlThat file only
Directorygh infra plan repos/All *.yaml / *.yml directly under it (subdirectories are ignored)
Multiplegh infra plan repos/ files/Manifests from all listed paths combined

Overlapping paths (e.g., . and ./repos/) are rejected to prevent duplicate processing.

YAML files that are not gh-infra manifests are silently skipped. Use --fail-on-unknown to treat them as errors.

FlagDescription
-r, --repo <owner/repo>Target a specific repository
--ciExit with code 1 if changes detected (useful for CI drift detection)
--fail-on-unknownError on YAML files with unknown Kind (default: silently skip)
Terminal window
# Plan all YAML files in a directory
gh infra plan ./repos/
# Plan multiple directories at once
gh infra plan ./repos/ ./files/
# Plan a single file
gh infra plan ./repos/my-cli.yaml
# Plan a specific repository
gh infra plan ./repos/ --repo babarot/my-cli
# CI drift detection
gh infra plan ./repos/ --ci