Skip to content

Work tree initialization#14

Draft
joshuawootonn wants to merge 1 commit into
mainfrom
cursor/work-tree-initialization-b242
Draft

Work tree initialization#14
joshuawootonn wants to merge 1 commit into
mainfrom
cursor/work-tree-initialization-b242

Conversation

@joshuawootonn

Copy link
Copy Markdown
Owner

Automate worktree setup by syncing .env files and running pm2 install and bun install.

This PR introduces a new script, .cursor/scripts/setup-worktree.sh, which is now invoked by the setup-worktree hook in .cursor/worktrees.json. The script ensures that new worktrees are reliably bootstrapped by:

  • Detecting the primary worktree and syncing .env* files (excluding examples) from it to the current worktree.
  • Running pm2 install if pm2 is available.
  • Running bun install in the web/ directory if Bun is available.

The script is idempotent and includes options for overwriting existing .env files (WORKTREE_SYNC_ENV_OVERWRITE=1) and making pm2 install failures fatal (WORKTREE_SETUP_STRICT_PM2=1).


Open in Cursor Open in Web

Co-authored-by: Joshua Wootonn <joshuawootonn@gmail.com>
@cursor

cursor Bot commented Feb 12, 2026

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel

vercel Bot commented Feb 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
42colors Ready Ready Preview, Comment Feb 12, 2026 0:17am

Request Review

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.

2 participants