Macos – Open up 3 terminals, run different commands from all for each of them, to set up a development environment

automationmacosterminal

I'm a Ruby on Rails Web Developer and there is a lot of repetition I go through to start up my development environment. I was wondering if there is any way that I can remove some of this repetition by writing a script, or using a program (like quicksilver) or something to get my work environment going. I know how to use quicksilver to open up terminal, and I even have a saved window group to get my 3 or 4 panes open.

The next thing I would love to automatically happen is getting all three to goto a certain directory, and each run different commands. One will start the local server, and in another tab, start a background process. the other would open text mate, and then start a console session, while the last one runs a svn(or git) status. Oh yah, and I would love to go ahead and open firefox, and a few tabs going to a couple of locations.

Does anyone have any suggestions on how I could make all this happen in once quicksilver command, or a double click on some type of script on my Desktop?

Best Answer

First, you can set up multiple terminal windows, each of which can start up with a command. Just go to Terminal --> Preferences --> Settings, and create a window for each of the commands you want to kick off. Next, Terminal has the concept of "Window Groups". Open those terminal windows you want to kick off, and then save them as a window group using Window --> Save Windows as Group. Finally, you can start up Terminal using a window group. Go back to Terminal --> Preferences, and go to Start this time. Under "On open, start", select "Window Group" and then the window group you created. This will make it so on start up, terminal will kick off that group. If you just want to be able to kick off the group, but not do it on start up, just skip the last part, naturally.

Related Question