mirror of
https://github.com/karakeep-app/karakeep.git
synced 2026-09-30 12:15:46 +02:00
Running several worktrees' dev envs side by side kept tripping agents: port 3000 taken, NEXTAUTH_URL pointing at another worktree, shared session cookies, an unmigrated queue DB, and tsx/file watching failing inside the Claude Code sandbox. scripts/dev-worktree.sh sets up whatever is missing (.env with a random NEXTAUTH_SECRET, symlinks, seed data), migrates both DBs, picks a free port with a matching NEXTAUTH_URL, starts workers and web, and waits until the app is ready. `pnpm dev:worktree setup` stops after the migrations. Also adds `pnpm db:migrate:queue` to migrate the queue DB without starting the workers, and a dev-env agent skill in .agents/skills (symlinked from .claude/skills). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>