dev-tools:sync
Installs and synchronizes dev-tools scripts, GitHub Actions, .editorconfig, and more.
Description
The dev-tools:sync
command synchronizes consumer-facing automation and defaults:
update-composer-json- adds dev-tools scripts to composer.jsoncopy-resource- copies GitHub Actions workflows, including changelog automationcopy-resource- copies .editorconfigcopy-resource- copies dependabot.ymlcodeowners- generates.github/CODEOWNERSfrom local metadatafunding- synchronizescomposer.jsonfunding metadata with.github/FUNDING.ymlwiki --init- initializes wiki as submodulegitignore- merges .gitignore filesgitattributes- manages export-ignore rulesskills- synchronizes packaged skillsagents- synchronizes packaged project agentslicense- generates LICENSE filegit-hooks- installs Git hooks
Usage
composer dev-tools:sync
composer dev-tools:sync [options]
Options
--overwrite, -o- Overwrite existing target files. Text resources copied through
copy-resourceshow a readable diff in the sync output before they are replaced. --dry-run- Preview managed-file drift without writing changes.
--check- Report managed-file drift and exit with code
1when updates are required. --interactive- Prompt before replacing drifted managed files.
--json- Emit a structured machine-readable payload instead of the normal terminal output.
--pretty-json- Emit the same structured payload with indentation for terminal inspection.
Examples
Run sync:
composer dev-tools:sync
Sync with overwrite:
composer dev-tools:sync --overwrite
Preview managed-file drift:
composer dev-tools:sync --dry-run
Fail in CI when managed files drift:
composer dev-tools:sync --check
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success. All syncs completed. |
| 1 | Failure. One or more syncs failed. |
Behavior
- Updates
composer.jsonscripts, extra configuration, managed funding metadata, and managed.github/CODEOWNERScontent. - Copies missing workflow stubs, including tests, reports, wiki, and changelog
automation, plus
.editorconfiganddependabot.yml. - Generates
.github/CODEOWNERSfrom local metadata and preserves existing ownership rules by default unless--overwriteor an explicit preview mode is used. - Synchronizes supported funding metadata between
composer.jsonand.github/FUNDING.yml. - When
--overwriteis enabled, replaced text resources emit a unified diff so terminal sessions and CI logs show what changed. --dry-runand--checkverify managed-file drift forcomposer.json,.github/CODEOWNERS, funding metadata, copied resources,.gitignore,.gitattributes,LICENSE, and Git hooks.--interactiveprompts before replacing drifted managed files when the command is running in an interactive terminal.- Creates
.github/wikias a git submodule when missing. - Calls other commands in sequence.
- Runs
skillsandagentsin normal mode so consumer repositories receive both packaged procedural skills and packaged role prompts. wiki,skills, andagentsare skipped in preview/check modes until they expose a non-destructive verification path.