From fc00dab988843d680bc83b0c3bcfe04371fde061 Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Sat, 8 Nov 2025 20:41:25 -0800 Subject: [PATCH 1/3] Add Conductor workspace automation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Setup script handles dependency installation, direnv, and Neon branches - Each workspace gets isolated Neon database branch - Run script starts all dev servers via Turbo 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- conductor-setup.sh | 31 +++++++++++++++++++++++++++++++ conductor.json | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100755 conductor-setup.sh create mode 100644 conductor.json diff --git a/conductor-setup.sh b/conductor-setup.sh new file mode 100755 index 00000000000..665e201e7d2 --- /dev/null +++ b/conductor-setup.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -e + +echo "🚀 Setting up Superset workspace..." + +# Install dependencies +echo "📥 Installing dependencies..." +bun install + +# Link direnv config +echo "🔧 Linking .envrc..." +ln -sf "$CONDUCTOR_ROOT_PATH/.envrc" .envrc + +# Create Neon branch for this workspace +echo "🗄️ Creating Neon branch..." +WORKSPACE_NAME=$(basename "${CONDUCTOR_WORKSPACE_PATH:-$PWD}") +NEON_OUTPUT=$(neonctl branches create \ + --project-id tiny-cherry-82420694 \ + --name "$WORKSPACE_NAME" \ + --output json) + +# Parse connection strings and create .env +DATABASE_URL=$(echo "$NEON_OUTPUT" | jq -r '.connection_uris[0].connection_uri') +DATABASE_POOLED_URL=$(echo "$NEON_OUTPUT" | jq -r '.connection_uris[1].connection_uri // empty') + +cat > .env << EOF +DATABASE_URL=$DATABASE_URL +DATABASE_POOLED_URL=$DATABASE_POOLED_URL +EOF + +echo "✨ Done! Neon branch: $WORKSPACE_NAME" diff --git a/conductor.json b/conductor.json new file mode 100644 index 00000000000..a8179bddf46 --- /dev/null +++ b/conductor.json @@ -0,0 +1,7 @@ +{ + "scripts": { + "setup": "./conductor-setup.sh", + "run": "bun dev" + }, + "runScriptMode": "nonconcurrent" +} From 844b4555a16875908d47d22021c32a8216ecd6c1 Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Sat, 8 Nov 2025 20:43:40 -0800 Subject: [PATCH 2/3] Remove run script - let developers choose which apps to run --- conductor.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/conductor.json b/conductor.json index a8179bddf46..1ff746037b9 100644 --- a/conductor.json +++ b/conductor.json @@ -1,7 +1,5 @@ { "scripts": { - "setup": "./conductor-setup.sh", - "run": "bun dev" - }, - "runScriptMode": "nonconcurrent" + "setup": "./conductor-setup.sh" + } } From 39a22beca6b8db6eeaa0a35aeea939edd1272da4 Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Sat, 8 Nov 2025 20:48:31 -0800 Subject: [PATCH 3/3] Add dependency checks with clear error messages --- conductor-setup.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/conductor-setup.sh b/conductor-setup.sh index 665e201e7d2..9a0a58136ff 100755 --- a/conductor-setup.sh +++ b/conductor-setup.sh @@ -1,15 +1,29 @@ #!/usr/bin/env bash set -e +RED='\033[0;31m' +GREEN='\033[0;32m' +NC='\033[0m' + +error() { echo -e "${RED}✗${NC} $1"; exit 1; } +success() { echo -e "${GREEN}✓${NC} $1"; } + echo "🚀 Setting up Superset workspace..." +# Check dependencies +command -v bun &> /dev/null || error "Bun not installed. Install from https://bun.sh" +command -v neonctl &> /dev/null || error "Neon CLI not installed. Run: npm install -g neonctl" +command -v jq &> /dev/null || error "jq not installed. Run: brew install jq" + # Install dependencies echo "📥 Installing dependencies..." bun install +success "Dependencies installed" # Link direnv config echo "🔧 Linking .envrc..." ln -sf "$CONDUCTOR_ROOT_PATH/.envrc" .envrc +success "direnv configured" # Create Neon branch for this workspace echo "🗄️ Creating Neon branch..." @@ -28,4 +42,5 @@ DATABASE_URL=$DATABASE_URL DATABASE_POOLED_URL=$DATABASE_POOLED_URL EOF -echo "✨ Done! Neon branch: $WORKSPACE_NAME" +success "Neon branch created: $WORKSPACE_NAME" +echo "✨ Done!"