Skip to content

Instantly share code, notes, and snippets.

@munkhorgil
Last active October 10, 2019 15:34
Show Gist options
  • Save munkhorgil/8d01c591328a94fe9267f2f20967eee8 to your computer and use it in GitHub Desktop.
Save munkhorgil/8d01c591328a94fe9267f2f20967eee8 to your computer and use it in GitHub Desktop.
Start multiple project at once on macOS
#!/bin/bash
osascript <<EOD
tell application "iTerm"
tell current window
-- create a tab for repo: erxes/erxes
create tab with default profile
tell current session
write text "cd ~/Documents/repos/erxes"
write text "yarn start"
-- split tab vertically to run scheduler
split vertically with default profile
end tell
-- create tab for repo: erxes/erxes-api
tell last session of last tab
write text "cd ~/Documents/repos/erxes-api"
write text "yarn dev"
-- split tab vertically to run scheduler
split vertically with default profile
end tell
-- create tab for repo: erxes/erxes-integrations
tell last session of last tab
write text "cd ~/Documents/repos/erxes-integrations"
write text "yarn dev"
end tell
-- start redis-server
create tab with default profile
tell current session
write text "redis-server"
end tell
close current tab
-- show notification
display notification "Let's get some shit done" with title "Enjoy your day!" subtitle "💪💪💪"
end tell
end tell
EOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment