sync applies template-backed repo standards into an existing repository.
It is the write-back counterpart to audit.
oss-bootstrap sync --target <path> [--dry-run] [--json]In v1, sync only manages template-owned files that are safe to update repeatedly.
README.mdAGENTS.mdCHANGELOG.mdCONTRIBUTING.mdCODE_OF_CONDUCT.mdSECURITY.mdLICENSE.editorconfig.gitignore.github/workflows/ci.yml.github/workflows/release.yml.github/ISSUE_TEMPLATE/bug_report.md.github/ISSUE_TEMPLATE/feature_request.md.github/PULL_REQUEST_TEMPLATE.md
src/**test/**package.jsontsconfig.jsoneslint.config.jstsup.config.tsvitest.config.ts
The goal is to fix repo drift without rewriting user product code or build choices.
sync renders templates using values inferred from the target repo:
- project name
- description
- GitHub username
- author name
- author email
- license
- package manager
Inference sources:
package.json- repository/homepage/bugs URLs
- repo folder name
- safe defaults
For each managed file:
- if missing: create it
- if present and different: update it
- if present and identical: skip it
sync must print which files were created, updated, or skipped.
With --dry-run, sync performs the same comparison but does not write files.
This is the default review path for existing repos.
Human-readable output must include:
- target path
- whether this was a dry run
- created files
- updated files
- skipped files
JSON output must include:
targetdryRuncreatedupdatedskippedpackageManagerlicense
- exit
0: command completed - exit
1: target could not be analyzed or templates could not be rendered
- never touch
src/ortest/ - never regenerate starter code
- never overwrite
package.json - keep sync bounded to template-backed standards first