59API

← Volver a las guías

Best iTerm2 Setup for Claude Code in 2025

Claude Code · EN · 2026-08-08

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.

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.

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.

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:

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.

Precios · Docs

¿Listo para empezar?

Conecta Claude y GPT en minutos a los precios más bajos, sin recortes. Regístrate para obtener tu clave API.

Registro gratis