How to organize your Mac terminal by project

Too many terminal tabs? Here is a simple way to give each project its own space, and find everything where you left it.

3 min read

Neat clusters of glowing green and blue blocks, connected by thin lines on a dark navy grid

If you work on more than one project, your terminal probably looks familiar: a row of identical tabs, a server running in one of them, and no idea which. Every switch starts with working out which tab is which.

The fix is to organize your Mac terminal by project instead of by tab. This guide shows a setup that takes about two minutes.

Give each project one place

Think about what a project needs while you work on it. For a typical web app, that might be:

  • A dev server that keeps running
  • A terminal for tests
  • A terminal for Git and everyday commands

Those belong together on one screen. When you change projects, you want to switch that whole set at once and leave the other one running.

In TerminalSpace, this is a workspace: a tab with its own terminals, layout, folder and color.

  1. Press ⌘ T.
  2. Name it after the project.
  3. Pick a layout.
  4. Set the project's folder as the Working directory, so its terminals start there.
  5. Pick a color you will recognize.
Creating a workspace
Creating a workspace

Repeat that for each project. You can then jump between them with ⌘ 1, ⌘ 2 and so on, while every shell keeps running.

Arrange the terminals around your work

Give the most important terminal the most room. A layout that works well for many projects is one tall terminal on the left for the server or editor, with two stacked on the right.

A workspace with a server, tests and Git
A workspace with a server, tests and Git

You can change the arrangement at any time:

Name your terminals

A name such as "Terminal 3" does not say what is running. Double-click a terminal's title and call it Dev server, Tests or Production.

For anything risky, go one step further and give that terminal its own color theme. A distinct background on your production shell is a useful reminder of where you are about to type.

Keep the commands you always forget

Everyone has a few commands they look up again and again. Save them as snippets and insert them from a menu in any terminal. TerminalSpace includes 110 ready-made ones for Git, Docker, Node, Laravel, Homebrew, SSH and more, and you can add your own.

A snippet is placed at the prompt without running, so you can check it and fill in any blanks first.

Stop watching long commands

Instead of checking on a long build, switch to something else. With command notifications, your Mac tells you when a command finishes in a terminal you cannot see, and clicking the notification takes you back to that workspace.

Pick up where you left off

When you reopen TerminalSpace, your workspaces, layouts, folders and recent output come back. Programs that were running do not, because quitting ends them, so it is worth stopping long jobs first. Closing the window, on the other hand, keeps every shell running.

A simple setup to start with

  1. Create one workspace for the project you are working on today.
  2. Use one large terminal and two small ones.
  3. Name all three.
  4. Save the one command you always have to look up.

Get TerminalSpace

Terminal workspaces for your Mac.