Guide
How to Switch Between Projects in Terminal Fast
Every developer with more than a handful of repos has felt the friction: you need to jump from one project to another, and suddenly you are typing out directory paths from memory, running find, or scrolling through shell history. Here is how to fix that.
The Problem: Context Switching Kills Your Flow
Research on developer productivity consistently shows that context switches are the most expensive interruptions in a coding session. When you break from writing code to figure out where a project lives on disk, you are not just losing the 10-30 seconds it takes to navigate there. You are losing the mental context you built up in the previous project.
The typical workflow looks something like this: you finish a task in project A, you need to check something in project B, and now you are trying to remember whether it was in ~/dev/work/ or ~/projects/company/. You start tab-completing paths, maybe run ls a couple of times, and eventually land in the right directory. Multiply this by 20 times a day across 5 different projects, and you are burning real time.
Level 0: The Manual Workflow
The most common approach is manual navigation using cd. It works when you have 3-5 projects. It falls apart beyond that.
Some developers improve this with shell aliases:
This helps, but it does not scale. You need to manually maintain the alias list, remember the alias names, and add new aliases every time you clone a new repo. For a developer working on 30+ repos, this quickly becomes its own maintenance burden.
Level 1: Directory Jumpers (z, zoxide, autojump)
Tools like zoxide, z, and autojump track the directories you visit and let you jump to them with partial matches. After you have visited a directory, you can return to it by typing just a fragment of its name.
This is a significant improvement. The limitation is that these tools are purely directory jumpers: they get you into the right folder, but that is where they stop. You still need to open your editor, start your dev server, arrange your terminal panes, and so on. They also require you to have visited the directory at least once before they know about it.
Level 2: The fzf Approach (DIY Script)
fzf is a general-purpose fuzzy finder. You can combine it with find or fd to build an interactive project picker:
Now you can type proj, get an interactive list of every git repository under ~/dev, and fuzzy-search by name. This is a real productivity boost.
However, the script has gaps. It rescans the filesystem every time (slow with many repos). It has no frecency sorting, so your most-used projects are buried alongside repos you cloned once six months ago. And once you land in the directory, you still need to set up your workspace manually. For a more complete fzf-based solution, see our fzf project switcher guide.
Level 3: Using son (Zero-Config Solution)
son is a CLI tool designed specifically for this problem. It discovers every project under your dev directories, ranks them by frecency (a combination of how frequently and how recently you use them), presents them through fzf, and then opens a full workspace in your terminal -- editor, split panes, dev server, and all.
No config file needed. No aliases to maintain. No filesystem scan lag (son caches and incrementally updates). Your most-used projects surface to the top automatically. And when you select one, it does not just cd you there -- it opens a complete workspace with your preferred layout.
Keyboard Shortcuts for Even Faster Switching
You can bind son to a keyboard shortcut in your shell so you do not even need to type the command name. Add this to your shell config:
Now pressing Ctrl + P instantly opens the project picker. Select a project, press Enter, and your workspace opens. Two keystrokes from thought to code.
Tips for Managing 100+ Repos
When your project count climbs into the hundreds, even fuzzy search can feel slow if you do not have good habits:
- 1.Use a consistent directory structure. Organize repos as
~/dev/org/repo(e.g.,~/dev/mycompany/api). This makes fuzzy matching predictable. See our git repo management guide for more on this. - 2.Trust frecency. Do not try to organize your project list manually. Let the tool surface what you actually use. After a week, the top 10 results will match your workflow perfectly.
- 3.Archive aggressively. Move repos you are done with to an
~/archivedirectory outside your scan path. Less noise, faster results. - 4.Use per-project configs. For repos with unique workspace needs (e.g., a microservices project that needs 4 panes), add a
.son.tomlso the workspace opens exactly the way you need it. See the tmux split panes guide.
Stop cd-ing. Start shipping.
Install son in one command and switch between projects in under a second.