feat(cli): gx ci-init — scaffold budget-friendly workflows into a repo#575
Merged
NagyVikt merged 1 commit intoMay 13, 2026
Merged
Conversation
Wires the gitguardex CI workflow templates into target repos in one command. Mirrors what `gx setup` would do for the full installer set but scoped to .github/workflows/ only — useful for projects that already have their other guardex state set up and just want the budget posture. gx ci-init [--target <path>] [--dry-run] [--force] [--no-stage] [--json] - Copies ci.yml, ci-full.yml, cr.yml, README.md from templates/github/workflows/ into <target>/.github/workflows/. - Skips files that already exist; --force overwrites. - Stages copied files with `git add` when the target is a git repo; --no-stage opts out. - --dry-run lists the plan without touching the filesystem. - --json emits the structured plan/summary. Also adds ci-full.yml + README.md to TEMPLATE_FILES so `gx setup` ships them alongside the existing cr.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New
gx ci-initsubcommand. Wires the gitguardex CI workflow templates into target repos in one command.ci.yml,ci-full.yml,cr.yml,README.mdfromtemplates/github/workflows/into<target>/.github/workflows/.--forceoverwrites.git addwhen the target is a git repo;--no-stageopts out.--dry-runlists the plan without touching the filesystem.--jsonemits the structured plan/summary.Also adds
ci-full.yml+github/workflows/README.mdtoTEMPLATE_FILESsogx setupships them alongside the existingcr.yml.Test plan
node --checkon all touched JS filesnode --test test/ci-init.test.js— 9/9 passing (arg parsing, plan, perform, dry-run, skip/force, format)gx ci-init --helprenders the documented contractgx ci-init --target /tmp/x --dry-runlists 4 file plansgx ci-init --target /tmp/xwrites the 4 expected files🤖 Generated with Claude Code