feat: add worktrunk setup for browseros-agent development

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Felarof
2026-03-13 13:17:08 -07:00
parent 95c855a091
commit 439acc8b12
2 changed files with 36 additions and 0 deletions

34
.config/README.md Normal file
View File

@@ -0,0 +1,34 @@
# Worktrunk Setup
This repo uses [Worktrunk](https://github.com/max-sixty/worktrunk) for running multiple Claude Code agents in parallel on different branches.
## Install Worktrunk
```bash
brew install max-sixty/worktrunk/wt
wt config shell install
# restart terminal
```
## Quick Commands
| Task | Command |
|------|---------|
| Create worktree + start Claude | `wt switch -c -x claude feat-name` |
| Switch to existing worktree | `wt switch feat-name` |
| List all worktrees | `wt list` |
| Create PR | `gh pr create` |
| Remove worktree | `wt remove feat-name` |
## What happens on `wt switch -c`
1. Creates new worktree at `../browseros-main.feat-name/`
2. Runs `bun install` in `packages/browseros-agent/`
3. Copies `.env.*` files from main worktree's `packages/browseros-agent/apps/`
## Hooks
Hooks are configured in `.config/wt.toml`:
- **post-create**: Runs `bun install` in the agent package, copies env files and `.llm/` from the main worktree
- **pre-remove**: Syncs `.llm/` back to the main worktree before deletion

View File

@@ -1,4 +1,6 @@
[post-create]
install = "cd packages/browseros-agent && bun install"
env = "for f in {{ repo_root }}/packages/browseros-agent/apps/*/.env.*; do [ -f \"$f\" ] && cp \"$f\" \"${f#{{ repo_root }}/}\"; done 2>/dev/null || true"
llm = "cp -r {{ repo_root }}/.llm . 2>/dev/null || true"
[pre-remove]