plan
Show diff between YAML and current GitHub state. No mutations are made.
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.
| Argument | Example | Behavior |
|---|---|---|
(none) or . | gh infra plan | All *.yaml / *.yml in the current directory |
| File | gh infra plan repos/my-cli.yaml | That file only |
| Directory | gh infra plan repos/ | All *.yaml / *.yml directly under it (subdirectories are ignored) |
| Multiple | gh 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.
| Flag | Description |
|---|---|
-r, --repo <owner/repo> | Target a specific repository |
--ci | Exit with code 1 if changes detected (useful for CI drift detection) |
--fail-on-unknown | Error on YAML files with unknown Kind (default: silently skip) |
Examples
Section titled “Examples”# Plan all YAML files in a directorygh infra plan ./repos/
# Plan multiple directories at oncegh infra plan ./repos/ ./files/
# Plan a single filegh infra plan ./repos/my-cli.yaml
# Plan a specific repositorygh infra plan ./repos/ --repo babarot/my-cli
# CI drift detectiongh infra plan ./repos/ --ci