Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
52
TypeScript CLI tool for repository-as-code: sync files and manage settings across GitHub, Azure DevOps, and GitLab (including self-hosted). Changes via PRs by default, or direct push with `merge: direct`.
Loading actions...
TypeScript CLI tool for repository-as-code: sync files and manage settings across GitHub, Azure DevOps, and GitLab (including self-hosted). Changes via PRs by default, or direct push with merge: direct.
Full docs: https://anthony-spruyt.github.io/xfg/
When updating docs, update BOTH:
README.md - Badges, quick start onlydocs/ - Full documentation (GitHub Pages)npm run build # Compile TypeScript
npm test # Run unit tests
npm run dev # Run CLI via ts-node
MUST pass before any PR:
npm test - Unit tests./lint.sh - Lintingnpm run test:integration:githubnpm run test:integration:adonpm run test:integration:gitlabNote: CI integration tests only run on main branch, not on PR branches.
gh workflow run release.yaml -f version=patch # or minor/major
git, gh, az, glab CLIs (platform-specific, must be authenticated)| Module | Purpose |
|---|---|
config-normalizer.ts | Parses config, expands git arrays, merges content, interpolates env vars |
repository-processor.ts | Orchestrates per-repo: clone, write files, commit, PR/push |
authenticated-git-ops.ts | Wraps GitOps with per-command auth via -c url.insteadOf |
xfg-template.ts | ${xfg:repo.name} templating for repo-specific content |
manifest.ts | Tracks managed files for orphan deletion (deleteOrphaned) |
github-summary.ts | Writes job summary to GITHUB_STEP_SUMMARY in CI |
config-validator.ts | Validates raw config; validateForSync/validateForSettings per-command |
conditions.ref_name requires both include and exclude arrays (even if empty)pull_request rules require ALL parameters - provide defaults for missing onesnode dist/index.js settings --config <config.yaml>String.fromCharCode(0x1b) for ANSI escape in regex - \x1b and \u001b literals fail no-control-regexeslint-disable comments don't suppress CodeQL_varName) for intentionally unused destructured variablesgh pr merge <num> --auto --squash --delete-branchdocs/ - that's GitHub Pages; use plans/ for plans.json/.json5/.yaml/.yml → object content; others → string/string[]${VAR} as $${VAR} to output literal (for devcontainer.json, shell scripts)${xfg:var} as $${xfg:var} similarly.sh files auto-marked executable unless executable: falsechore/sync-config (reuses existing branch/PR if found)