CLI Reference
betterspec sync
Sync with global spec repository
betterspec sync
Pull the latest specs from the configured global spec repository and merge them into your local betterspec directory. Only relevant when running in local+global or global mode.
Usage
betterspec syncOptions
| Option | Description |
|---|---|
--force | Force sync, overwriting local spec changes |
-C, --cwd <path> | Run as if betterspec was started in <path> |
Behavior
Fetches from the remote spec repository configured via spec.repo and spec.branch in your config. Local specs that have not been modified are updated in place. If local modifications conflict with upstream changes, sync will stop and report the conflict unless --force is used.
Examples
$ betterspec sync
Syncing with git@github.com:acme/specs.git (main)...
Updated: spec/api-design.md
Updated: spec/data-model.md
Skipped: spec/auth-flow.md (local modifications)
Sync complete. 2 updated, 1 skipped.Force overwrite local changes:
$ betterspec sync --force
Syncing with git@github.com:acme/specs.git (main)...
Updated: spec/api-design.md
Updated: spec/data-model.md
Updated: spec/auth-flow.md (overwritten)
Sync complete. 3 updated.