Skip to content

Adds CLI command to sync workbench files#36

Merged
aboo merged 2 commits into
mainfrom
feature/pap-7087-update-workbench-using-cli
May 17, 2026
Merged

Adds CLI command to sync workbench files#36
aboo merged 2 commits into
mainfrom
feature/pap-7087-update-workbench-using-cli

Conversation

@aboo
Copy link
Copy Markdown
Contributor

@aboo aboo commented May 17, 2026

What does this PR do?

Adds a new workbench --sync CLI command, enabling users to update their local workbench configuration and managed files from a designated source repository. This feature ensures consistency across workbench instances and simplifies the process of keeping local setups aligned with upstream changes.

The command:

  • Reads the source repository and branch from .workbench/config.yaml, which is now populated during workbench initialization.
  • Verifies a clean Git working tree to prevent overwriting uncommitted changes.
  • Prompts for user confirmation before proceeding with the sync operation.
  • Fetches the latest versions of specified files and directories (e.g., .opencode, .workbench/schemas, README.md) from the source repository.
  • Automatically commits any detected changes after the sync, including the source commit SHA in the message.
  • Introduces sync.paths in .workbench/settings.yml and its schema for customizing which files are managed by the sync process.

Relates to PAP-7087

aboo added 2 commits May 17, 2026 13:59
- Persist source repository info in config.yaml at init time for sync
  provenance
- Read sync paths from source settings.yml, enabling custom forks with
  additional directories
- Apply merge semantics: directories merge without deletions, files
  overwrite unconditionally
- Guard against dirty working tree; require user confirmation before
  proceeding
- Auto-commit sync results with a short SHA reference to the source
  commit
- Update schemas for the new source config block and sync.paths setting

Delivers PAP-7087
@aboo aboo merged commit ef57f4e into main May 17, 2026
1 check passed
@aboo aboo deleted the feature/pap-7087-update-workbench-using-cli branch May 17, 2026 06:01
aboo added a commit that referenced this pull request May 17, 2026
## What does this PR do?

Adds comprehensive documentation for the new `workbench --sync` command
to both the main `README.md` and `packages/workbench-cli/README.md`.
This update provides clear guidance on the command's purpose, detailing
how it fetches and merges managed workbench files from the source
repository to keep a local workbench up to date. It also includes usage
examples, the underlying process for applying changes, prerequisites,
and new troubleshooting entries.

Relates to #36
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