FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
I got tired of writing the same 80-line setup script for every AI worktree
How-ToSystems

I got tired of writing the same 80-line setup script for every AI worktree

via Dev.toRohan Sharma10h ago

If you've been running parallel AI coding agents — Claude Code, Aider, Codex, anything — you've hit this wall. Each agent needs its own worktree. Each worktree needs its own environment. And that means every time you spin one up, you're either manually editing .env files or you've got a setup script that looks something like this: #!/bin/bash # conductor.json worktree script — set up isolated environment BRANCH_NAME="${CONDUCTOR_BRANCH_NAME}" SLUG="${BRANCH_NAME//\//_}" SLUG="${SLUG//-/_}" BASE_PORT=3000 USED_PORTS=$(cat ~/.worktree-ports 2>/dev/null || echo "") PORT=$BASE_PORT while echo "$USED_PORTS" | grep -q "^$PORT$"; do PORT=$((PORT + 1)) done echo "$PORT" >> ~/.worktree-ports DB_NAME="myapp_${SLUG}" COMPOSE_PROJECT="myapp_${SLUG}" REDIS_PORT=$((PORT + 1000)) cat > .env.local << EOF PORT=$PORT DB_NAME=$DB_NAME DATABASE_URL=postgres://localhost/$DB_NAME COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT REDIS_URL=redis://localhost:$REDIS_PORT EOF createdb "$DB_NAME" 2>/dev/null || true echo "S

Continue reading on Dev.to

Opens in a new tab

Read Full Article
1 views

Related Articles

Stop Using Channels for Everything
How-To

Stop Using Channels for Everything

Medium Programming • 11h ago

The Better Way to Configure Entity Framework Core
How-To

The Better Way to Configure Entity Framework Core

Medium Programming • 13h ago

Microsoft’s big developer conference returns to San Francisco in June
How-To

Microsoft’s big developer conference returns to San Francisco in June

The Verge • 14h ago

EA continues to ‘evolve’ The Sims 4 with new virtual currency and a ‘maker’ program
How-To

EA continues to ‘evolve’ The Sims 4 with new virtual currency and a ‘maker’ program

The Verge • 15h ago

OSS Pull Request Therapy: Learning to Enjoy Code Reviews with npmx
How-To

OSS Pull Request Therapy: Learning to Enjoy Code Reviews with npmx

FreeCodeCamp • 16h ago

Discover More Articles