workbay-bootstrap
Pip-installable CLI that hoists the shared workbay-system surface
(typed protocol, two MCP servers, hooks, skills, generated agent
workflows) into consumer repositories. Lives inside
darce/workbay.
Consumers run workbay-bootstrap install --target <path> once; it
clones the monorepo, materializes the overlay, and registers both
managed MCP servers (mcp-workbay-handoff, mcp-workbay-orchestrator)
across .mcp.json, .vscode/mcp.json, and .codex/config.toml. No
hand-edits required.
Install
From PyPI (recommended)
uvx --from workbay-bootstrap workbay-bootstrap install --target /path/to/your/repo
# or, persistent:
uv tool install workbay-bootstrap
From the monorepo source tree (development)
cd packages/workbay-bootstrap
python -m pip install -e ".[dev]"
Direct from git (private-repo phase, before PyPI release)
One-shot (no install — fetches each invocation):
uvx --from "git+https://github.com/darce/workbay@workbay-bootstrap-v0.2.1#subdirectory=packages/workbay-bootstrap" \
workbay-bootstrap install \
--target /path/to/your/repo
Persistent (recommended once you start running status / doctor
regularly — installs workbay-bootstrap onto $PATH):
uv tool install "git+https://github.com/darce/workbay@workbay-bootstrap-v0.2.1#subdirectory=packages/workbay-bootstrap"
# then:
workbay-bootstrap status --target /path/to/your/repo
workbay-bootstrap doctor --target /path/to/your/repo
# upgrade later:
uv tool upgrade workbay-bootstrap
Hardlink warning on first install? If you see
Failed to hardlink files; falling back to full copy, youruvcache and tool dir live on different filesystems. The install still succeeds; silence the warning withexport UV_LINK_MODE=copyin your shell profile.
Subcommands
workbay-bootstrap install --target <path> [--remote-ref <tag>] [--mcp-servers <default|path>] [--no-mcp-servers]
workbay-bootstrap update --target <path> --remote-ref <tag>
workbay-bootstrap status --target <path>
workbay-bootstrap doctor --target <path> [--mcp-servers <default|path>]
workbay-bootstrap repair --target <path> [--force-dirty] [--mcp-servers <default|path>]
workbay-bootstrap adopt-worktree [--target <linked-worktree>] [--primary <root>] [--check] [--json]
install: Clone the monorepo, materialize SHARED + GENERATED surfaces, write the three MCP-config files, runinit-stateto provision<target>/.task-state/handoff.db(skipped under--no-mcp-servers), setcore.hooksPath, and write the overlay manifest.update: Re-run install at a new--remote-ref; refresh GENERATED surfaces and, optionally, configs.status: Print a summary of the installed overlay manifest. When the install registered MCP servers, also reports the resolvedstate_dir/db_path/exports_dir/schema_versionviainit-state --check.doctor: Detect drift in SHARED, GENERATED, config, and initialized-state surfaces. Flags missing.task-state/handoff.dbasstate_driftonly when the manifest recorded.mcp.json. Exit1when drift exists.repair: Restore drifted surfaces flagged bydoctor. For an unadopted linked worktree this routes toadopt-worktree(below).adopt-worktree: Materialize the overlay into a linked git worktree by redirecting its surfaces at the primary's.workbay/remoteclone (one hop, relative links).--targetdefaults to the current directory; the primary is resolved by the.workbay-bootstrap.jsonmarker unless--primaryis given.--checkreports drift without writing and exits1when the worktree is unadopted. A no-op on the primary worktree.
Linked worktrees
A linked worktree (git worktree add, or an IDE/agent auto-worktree)
shares the primary's .git but not gitignored files, so the
overlay starts absent — the plugin is enabled (tracked
.claude/settings.json) but unresolvable. Self-heal works as follows:
-
make task-start(the supported flow) adopts the overlay into the new worktree automatically, so it works out of the box. In source checkouts, the lifecycle uses the freshly provisioned worktree.venvworkbay-bootstrapcommand when available, then falls back touvx. SetWORKBAY_ADOPT_CMD=""to disable auto-adopt, or set it to a custom command to override that default. -
Post-provision bootstrap — after adopt,
make task-startcan also run a consumer-declared shell command (for examplenpm install) viaLIFECYCLE_WORKTREE_BOOTSTRAPin the rootMakefile. Best-effort, worktree-rooted,sh -csemantics; see the development-workflow rule doc. -
Raw
git worktree add/ auto-worktrees are healed on demand:uvx workbay-bootstrap adopt-worktree --target <worktree> # or, as a steady-state guard (exit 1 on drift): uvx workbay-bootstrap adopt-worktree --target <worktree> --check
.task-state/, DASHBOARD.txt, and CURRENT_TASK.json are never
adopted — they stay per-worktree (the handoff DB is primary-rooted).
See docs/CONSUMER.md
for the consumer-facing walkthrough (upgrade, drift handling, skill
overrides, the current_task_auto_regen migration note).
Surfaces written by install
The canonical source of truth for bootstrap-managed surfaces is the
installer implementation in
src/workbay_bootstrap/install.py (SHARED_SURFACES and
GENERATED_SURFACES). Keep this table aligned with those constants.
| Surface | Source | Layer |
|---|---|---|
scripts/hooks/ |
shared | symlink |
.github/hooks/ |
shared | symlink |
docs/workbay/contracts/ |
shared | symlink |
docs/workbay/rules/ |
shared | symlink |
Makefile.d/ non-excluded children |
shared | carved dir |
scripts/workbay/ non-excluded children |
shared | carved dir |
.github/prompts/ |
generated | real dir |
.workbay/generated/plugins/workbay-system/base/ |
generated | real dir |
.workbay/generated/plugins/workbay-system/effective/ |
generated | real dir |
.mcp.json |
generated | real file |
.vscode/mcp.json |
generated | real file |
.codex/config.toml |
generated | real file |
core.hooksPath git config |
generated | git config |
.task-state/handoff.db |
runtime | sqlite |
.task-state/exports/ |
runtime | dir |
.workbay/remote/ |
bootstrap | git clone |
.workbay-bootstrap.json |
bootstrap | manifest |
.task-state/ is provisioned by the handoff server's init-state
subcommand at install time and is gitignored — each fresh checkout
regenerates it through workbay-bootstrap install.
Defaults
--profiledefaults toall, which materializes the full surface set: generated Copilot prompts, Claude/Codex plugin trees, shared overlay surfaces, and the lifecycle hoist (Makefile.d/lifecycle.mkplus the sentinel-bracketed-includeblock in the consumerMakefile). Pass--profile minimalfor a clone-only install with no surfaces, or--profile lifecyclefor just the lifecycle runner and Makefile fragment. The active profile is recorded in.workbay-bootstrap.jsonunder"profile".--remote-urldefaults togit@github.com:darce/workbay.git.--remote-refdefaults tomain(override with a release tag likev0.1.0).--mcp-serversdefaults to the built-in managed map registeringmcp-workbay-handoffandmcp-workbay-orchestratorviauvxwith--workspace-root . serve-stdio, so Codex, VS Code, and Claude clients start real MCP stdio servers from the generated config. Pass a JSON file path to override; pass--no-mcp-serversto skip the three config writers entirely.- Plugin overrides are auto-discovered at
workbay-overrides/workbay-system/when that root contains anoverrides.yamlmanifest. Use--plugin-overrides <path>oninstall,update,doctor, orrepairfor a non-default root; bootstrap records that path so later update/doctor/repair runs reuse it. Override-aware installs generate effective plugin trees under.workbay/generated/plugins/workbay-system/effective/{claude,codex}and point marketplace pins at those generated trees. installandupdatepreserve plugin override files by default.--reset-overridesis the explicit destructive path; it removes only the resolved override root, refuses dirty git worktrees unless--backupis supplied, and archives backups under.workbay/override-backups/<timestamp>/before removal.
Development
Tests live under tests/. From the monorepo root:
cd packages/workbay-bootstrap
PYTHONPATH=.:src:../workbay-protocol/src pytest tests -q
Metadata
Release files for workbay-bootstrap 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| workbay_bootstrap-0.2.1.tar.gz | 134.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| workbay_bootstrap-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 276.2 kB
Release files / workbay_bootstrap-0.2.1.tar.gz
| Download URL | workbay_bootstrap-0.2.1.tar.gz |
|---|---|
| Size | 134.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aac377de0566f2421c05189a76e0f480772e84c6677043754dbd97f9a131e363
|
|
BLAKE2b-256 checksum How to use checksums |
38fc17bdae03b7e9aad0f9124998f7c1f7470c37e4cc91636db47fa25e74e098
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / workbay_bootstrap-0.2.1-py3-none-any.whl
| Download URL | workbay_bootstrap-0.2.1-py3-none-any.whl |
|---|---|
| Size | 141.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e665c5aa74854d0bbfce56abd1a907a40bc9bf13387ea38a61f99e682e69e9a0
|
|
BLAKE2b-256 checksum How to use checksums |
c0e618f72bea7dc44951270a900870c5551a9951fe6d6b16b730220623ea1895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|