Skip to content

feat(cli): gx ci-init — scaffold budget-friendly workflows into a repo#575

Merged
NagyVikt merged 1 commit into
mainfrom
agent/claude/gx-ci-init-workflows-2026-05-14-01-38
May 13, 2026
Merged

feat(cli): gx ci-init — scaffold budget-friendly workflows into a repo#575
NagyVikt merged 1 commit into
mainfrom
agent/claude/gx-ci-init-workflows-2026-05-14-01-38

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Summary

New gx ci-init subcommand. Wires the gitguardex CI workflow templates into target repos in one command.

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 + github/workflows/README.md to TEMPLATE_FILES so gx setup ships them alongside the existing cr.yml.

Test plan

  • node --check on all touched JS files
  • node --test test/ci-init.test.js — 9/9 passing (arg parsing, plan, perform, dry-run, skip/force, format)
  • Live: gx ci-init --help renders the documented contract
  • Live: gx ci-init --target /tmp/x --dry-run lists 4 file plans
  • Live: gx ci-init --target /tmp/x writes the 4 expected files

🤖 Generated with Claude Code

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>
@NagyVikt NagyVikt merged commit 795af11 into main May 13, 2026
1 of 2 checks passed
@NagyVikt NagyVikt deleted the agent/claude/gx-ci-init-workflows-2026-05-14-01-38 branch May 13, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant