Is it possible to automate the creation and commands of terminal sessions?

My current project requires me to run about 5 terminal windows at the same time, which is making my desktop pretty messy.

Opening these console windows as sessions inside WebStorm makes things much cleaner.

However, I'd like if possible to automate the content and creation of these sessions, something like this:

  1. New session
    1. Rename tab to "Server"
    2. node index.js
  2. New Session
    1. Rename tab to "Grunt"
    2. grunt dev
  3. New Session
    1. cd /some/folder/
    2. some --task
    3. etc...

Is this possible?

  • I tried using a Macro, but it didn't record anything but typing.
  • Maybe a batch file?


automate terminal.png
Comment actions Permalink

There is no way to automate it, sorry
There is a request to persist terminal sessions on restart - see and related ticket (

Comment actions Permalink

Thanks Elena,

I created a simple request here:



Please sign in to leave a comment.