#!/usr/bin/env zsh
# Script to start monorepo development processes in separate terminals
open_position_run() {
local dir=$1
local cmd=$2
# Start the server
osascript -e 'tell application "Terminal"
do script "cd '"$dir"' && nvm use 20 && '"$cmd"' &" in window 1
end tell'
}
open_position_run "/Users/bakert/monorepo/apps/app1 "pnpm dev"
open_position_run "/Users/bakert/monorepo/apps/app2 "pnpm dev"
