Easy Project Switching With Itermocil + Command Line Shortcuts

Ryan Warner
Jan 23, 2019 · 1 min read

I often need to switch between multiple projects, or maybe I’m just getting started for the day. Spending time booting up these project environments is a waste.

These steps assume you use Mac, iTerm2, and VSCode

Itermocil

First install Itermocil for pre-configured layouts and commands saved in .yml files.

$ brew update && brew install TomAnthony/brews/itermocil$ mkdir ~/.itermocil && touch ~/.itermocil/projectname.yml && open ~/.itermocil/projectname.yml

Paste in this layout:

windows:
- name: projectname
root: /path/to/project
layout: even-horizontal
panes:
- npm run start
- git status

You can test this by typing “itermocil projectname” in iTerm2.

Command Line Shortcuts

To make this process even faster (9 keystrokes faster) setup an alias for each of your layouts.

$ echo 'alias projectname = "itermocil projectname"'>>~/.bash_profile$ source ~/.bash_profile$ projectname

You could take this a step further by opening VS Code to your project directory as part of the same alias.

Add `code` to your shell by following these steps (These are Mac instructions, check the link for other platforms):

1. Open VS Code

2. Press `F1` and search “shell”

3. Click on `Shell Command: Install ‘code’ command in PATH`

Now update your alias:

alias projectname = "itermocil projectname && code path/to/project/dir"

Let’s Go Design

Ryan Warner

Written by

Software Engineer and Designer https://github.com/RyanWarner

Let’s Go Design

Getting started is the hardest part; that’s why we’re here. Let’s work together and bring your idea into the world. https://lets-go.design

Ryan Warner

Written by

Software Engineer and Designer https://github.com/RyanWarner

Let’s Go Design

Getting started is the hardest part; that’s why we’re here. Let’s work together and bring your idea into the world. https://lets-go.design

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store