How I set up Claude Code in iTerm2 to launch all my AI coding projects in one click
Managing multiple Claude Code projects doesn't have to be chaotic. My iTerm2 setup dramatically reduces friction in my daily AI-assisted coding workflows - here's how.

Managing multiple Claude Code projects can be a daunting task, especially when you're juggling several AI-assisted coding workflows. However, with a well-thought-out setup in iTerm2, you can streamline your workflow and launch all your projects with just one click. In this article, I'll walk you through the steps I took to create my iTerm2 configuration, which has made a significant difference in my daily coding experience.
First, let's understand why setting up iTerm2 is beneficial. iTerm2 is a powerful terminal emulator for macOS that offers customization options to enhance productivity. By leveraging its features, you can create a tailored environment that simplifies project management and accelerates your workflow.
To begin, open iTerm2 and navigate to the Preferences menu. Here, you'll find the settings that allow you to configure your terminal environment. One of the key features you'll want to explore is the "Profiles" section. Profiles in iTerm2 define the settings for how your terminal behaves, such as the shell type, colors, and key bindings.
Once you've opened the Profiles settings, create a new profile specifically for your Claude Code projects. Name it something like "Claude Code" to keep your profiles organized. In this profile, set the shell to the version of zsh or bash you prefer. If you're using a version manager like asdf or vcpkg, ensure that your shell is configured to use the correct version of Python or other languages you need for your projects.
Next, consider setting up a custom directory structure for your Claude Code projects. Organizing your projects in a consistent manner makes it easier to navigate and manage them. A common approach is to create a dedicated folder, such as "claude_code_projects," and within it, create subfolders for each project. For example, you might have folders like "ai_assistant," "nlp_model," and "data_pipeline."
Now, let's move on to the heart of the setup: creating a script that launches all your projects with a single command. In iTerm2, you can create a "New Run Command" that executes a shell script. To do this, go to the Profiles settings, select the "Claude Code" profile, and navigate to the "Run" tab. Here, add a new command with the following content:
```bash
#!/bin/zsh
# Launch all Claude Code projects
cd ~/claude_code_projects
# Launch each project in a new tab
open -a "iTerm2" --args cd ai_assistant
open -a "iTerm2" --args cd nlp_model
open -a "iTerm2" --args cd data_pipeline
```
This script changes the directory to your "claude_code_projects" folder and then opens a new iTerm2 tab for each project. You can customize the script to include additional commands, such as activating virtual environments or running specific scripts within each project.
To make this setup even more efficient, consider using iTerm2's "Bookmarks" feature. Bookmarks allow you to save frequently used directories and quickly navigate to them. Create a bookmark for each of your Claude Code project folders, and you'll be able to jump directly into them with a single keystroke.
Another useful feature is iTerm2's "Split Pane" and "Tile Window" options. These allow you to organize multiple terminals in a way that maximizes your screen real estate and keeps your workflow visible. You can set up your iTerm2 window to display all your projects in separate panes, making it easy to switch between them without losing context.
Finally, don't forget to customize your key bindings in iTerm2. Assign shortcuts to your frequently used commands, such as running the script that launches your projects or switching between bookmarks. This will further enhance your productivity and make your workflow even smoother.
In conclusion, setting up iTerm2 for managing multiple Claude Code projects can significantly reduce the chaos of juggling multiple AI-assisted coding workflows. By creating a tailored profile, organizing your projects into a consistent directory structure, and automating the launch of each project with a script, you can streamline your workflow and focus on the coding itself. With additional features like bookmarks and custom key bindings, you'll find that your daily coding experience becomes more efficient and enjoyable.










