Remote script. The install command pipes install.sh from GitHub into bash; read it first if you prefer.
Who it is forA developer who wants to try two or three approaches to a task at once without agents trampling each other.
The problemSeveral agents in one checkout overwrite each other's files, and juggling worktrees by hand is tedious.
The outcomeSeparate workspaces, each a git worktree with its own branch, where you compare results and merge the good branch.
What you need first
- macOS, Linux or Windows (Linux needs the GTK and WebKit libraries listed in the README)
- A git repository
- JetBrains AI sign-in or a provider connected through pi's own auth
- The GitHub CLI (gh) for PR workflows
Steps
- Install on macOS or Linux with
curl -fsSL https://raw.githubusercontent.com/JetBrains/thinkrail/main/install.sh | bash - Open a repo with
thinkrail ~/code/my-repo - Create two or more workspaces from the project; each becomes a git worktree with its own branch
- Start a pi chat in each workspace with the approach you want it to try
- Review the diffs, merge the good branch and delete the rest
Prompt for your agent
Open <repo> in JetBrains/thinkrail, create two workspaces, and have one agent implement <task> with approach A and the other with approach B. Compare the diffs and test results, then tell me which branch to merge and why.
Caveat. ThinkRail is early (0.x releases with stable and nightly channels), so expect changes between versions.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for JetBrains/thinkrail and "Run parallel coding agents in isolated git worktrees"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer