termrc

Take your iTerm2 environments with you wherever you go.

Description

Termrc allows you to store information about your project's environment for a given project in a small YAML file called a .termrc file. Restoring your project's environment is as simple as calling termrc start. Enjoy.

Quick Start

$ gem install termrc
$ termrc create 
$ termrc start

.termrc file

The .termrc file is a YAML file which stores information about your project's environment. An environment, in this context, is an iTerm2 window with various panes, each with a different default command that is run when the pane opens. The layout dictates what your window looks like, while commands gives you a set of commands you can call for each pane.

Place the .termrc file at your project's root, then call termrc start. Voila!

Example .termrc

commands:
  here:       echo "Hello, here."
  there:      echo "Hello, there."
  world:      echo "Hello, world."
  me:         echo "Hello, me."
  you:        echo "Hello, you."

layout:
  - [ here, there ]       # row 1, with 2 panes
  - [ world ]             # row 2, with 1 pane
  - [ me, you ]           # row 3, with 2 panes

The Result A .termrc file is a YAML file which requires two keys: commands and a layout. Each item in layout corresponds to a row of panes in iTerm2. So, for instance, the example .termrc file above would produce a new iTerm2 window with the following commands running inside each pane:

You can supply an optional third key, root, which indicates the root directory you'd like each command to be run inside of. Have a look at this project's.termrc file for an example.

** Tabs ** You can automate tabs by providing an array of arrays, each array denoting a new tab and the layout within it. See this template file for an example.

CLI

$ termrc start      # Start termrc file (Shortcut: s, Argument 0: file (optional) )
$ termrc create     # Create termrc file       
$ termrc list       # List termrc files in folder (Shortcut: l, Argument 0: folder (optional))

License

Released under the MIT License.

Questions?

Find me on Twitter.

Resources