Original Reddit post

I made a simple little tool to help me isolate and parallelize dev environments when using git worktrees: https://github.com/stemps/treehouse It assigns a unique number to each worktree which you can use to run your dev env on a unique port or with a unique db. For example: PORT=“$(treehouse offset 3000)” npm run dev will run the first worktree on port 3000, the 2nd on port 3001, etc… Putting this in your Rails database.yml will give you a unique db per dev env: development: database: my_app_<%= treehouse current.strip %> Feel free to use with: brew install stemps/tap/treehouse submitted by /u/stemps

Originally posted by u/stemps on r/ClaudeCode