From 439acc8b123847731d58ab580e5cc2eb5b4d4238 Mon Sep 17 00:00:00 2001 From: Felarof Date: Fri, 13 Mar 2026 13:17:08 -0700 Subject: [PATCH] feat: add worktrunk setup for browseros-agent development Co-Authored-By: Claude Opus 4.6 --- .config/README.md | 34 ++++++++++++++++++++++++++++++++++ .config/wt.toml | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 .config/README.md diff --git a/.config/README.md b/.config/README.md new file mode 100644 index 000000000..f818961a1 --- /dev/null +++ b/.config/README.md @@ -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 diff --git a/.config/wt.toml b/.config/wt.toml index 798ce229b..eafcd9c39 100644 --- a/.config/wt.toml +++ b/.config/wt.toml @@ -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]