Best iTerm2 Setup for Claude Code in 2025
Start with the right terminal
If you are using Claude Code every day, your terminal is part of your editor, not just a window for commands. The best setup is fast, readable, and predictable under load. On macOS, iTerm2 is still the strongest choice because it gives you split panes, hotkeys, profile control, searchable scrollback, and deep keyboard customization without getting in the way.
For a clean from-zero setup, install iTerm2 first, then make it your default terminal. After that, spend five minutes on typography and color before touching any AI settings. A good terminal makes Claude Code feel calmer and easier to trust.
1. Install iTerm2 and choose a shell
Download iTerm2, open it once, and create a new profile. Use zsh if you are on modern macOS, since it is the default and works well with most developer tools. If you already use bash, that is fine too, but keep the shell consistent across your machines.
- Set your default profile in iTerm2 so new windows and tabs behave the same way.
- Enable the system in your login shell so environment variables load every time.
- Turn on shell integration if you want cleaner navigation and better command history.
2. Make text easy to scan
Claude Code often prints multiline plans, diffs, and logs. If the text is cramped, you will miss details. Use a programmer font such as JetBrains Mono, Menlo, or SF Mono. Increase font size slightly, add a little line spacing if needed, and choose a theme with strong contrast.
- Font size: large enough to read for long sessions, usually 13–15 px.
- Cursor: use a block or underline cursor that stands out.
- Theme: pick a dark theme if you work at night, but keep background and foreground contrast high.
- Window size: wide enough for side-by-side prompts and output, but not so wide that wrapping becomes hard to follow.
3. Add useful terminal habits for Claude Code
Claude Code works best when your terminal session is organized. Create a dedicated iTerm2 profile for AI coding with a distinct title, a saved working directory, and a muted color badge so you always know when you are in your agent session. Add split panes for output on one side and your editor or logs on the other. If you use tmux, even better: you can keep the same Claude session alive after closing the window.
It also helps to keep a small set of commands ready: git status, git diff, npm test, your project start command, and any deploy or lint command you run often. The goal is to let Claude Code move from suggestion to verification without context switching.
4. Point Claude Code to a cheaper API relay
Here is where cost and scale start to matter. If you want Claude Code access that stays affordable while still using official-quality models, 59API is a strong fit. It is a pay-as-you-go relay with cheap access to Claude Opus, Sonnet, Haiku, and Fable, and it is compatible with Claude Code, Codex, and any OpenAI SDK. The base URL is https://api.59api.com.
In practice, this means you can keep your terminal workflow the same while routing requests through a lower-cost endpoint. For most coding tasks, Sonnet is the best default. Use Opus when you need deeper reasoning, Haiku for quick edits or fast checks, and Fable if your workflow benefits from it. Because 59API uses native official-quality models, you are not trading reliability for price.
- Create your 59API account and generate an API key.
- Set the API base URL in your Claude Code or SDK configuration to https://api.59api.com.
- Store the key in your shell config or keychain, not in plain text files.
- Use the lowest-cost model that still solves the task well.
5. Test the full loop before real work
Before you trust the setup on production code, run a small test: ask Claude Code to inspect a file, suggest a refactor, and explain the diff. Then run your test suite from the same terminal session. This confirms that your shell, editor, and API routing all work together.
If prompts fail, check three things first: your environment variables, the model name, and the base URL. Most setup issues come from a mistyped key or a profile that did not load the login shell correctly.
6. Production-ready workflow tips
Once the basics work, tighten the workflow:
- Use one profile for local coding and another for production deploys.
- Keep separate tabs for logs, tests, and Claude Code output.
- Run git commits in small steps so Claude suggestions are easier to review.
- Use the same model choice for similar tasks to make cost predictable.
- Watch your token usage and switch to Haiku for lighter tasks.
If you want the best balance of speed, quality, and cost, a clean iTerm2 setup plus 59API is hard to beat. You get a polished terminal workflow, official-quality Claude models, and lower per-task spend without changing how you work. If that sounds right for your stack, sign up for 59API and try it on your next Claude Code project.
Prêt à commencer ?
Connectez Claude et GPT en quelques minutes aux prix les plus bas, sans bridage. Inscrivez-vous pour votre clé API.
Inscription gratuite