Skip to content

apply

Apply changes to GitHub. By default, requires interactive confirmation before proceeding.

Terminal window
gh infra apply [path...]

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

ArgumentExampleBehavior
(none) or .gh infra applyAll *.yaml / *.yml in the current directory
Filegh infra apply repos/my-cli.yamlThat file only
Directorygh infra apply repos/All *.yaml / *.yml directly under it (subdirectories are ignored)
Multiplegh infra apply 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
--auto-approveSkip confirmation prompt
--force-secretsRe-set all secrets (even existing ones)
--fail-on-unknownError on YAML files with unknown Kind (default: silently skip)

After the plan is displayed, the confirmation prompt offers three options:

> Do you want to apply these changes? (y)es / (n)o / (d)iff

Press d to open a full-screen diff viewer before deciding:

KeyAction
/ or j/kSelect file
TabToggle apply/skip for the selected file
d/uScroll diff pane
q/EscReturn to confirmation

Each file defaults to apply. Use Tab to toggle a file to skip if you want to exclude it from the current run. Skipped files are shown dimmed in the viewer. The YAML manifest is not modified — this is a runtime-only decision.

When you return to the confirmation prompt, any skipped files are shown as a summary:

Skipped files (this run only):
go.mod
> Do you want to apply these changes? (y)es / (n)o / (d)iff
Terminal window
# Apply all changes
gh infra apply ./repos/
# Apply multiple directories at once
gh infra apply ./repos/ ./files/
# Apply without confirmation (for CI)
gh infra apply ./repos/ --auto-approve
# Force re-set secrets
gh infra apply ./repos/ --force-secrets
# Apply to a specific repository
gh infra apply ./repos/ --repo babarot/my-cli