59API

← Volver a las guías

Best iTerm2 Setup for Claude Code Workflows

Claude Code · EN · 2026-09-13

Choose the right terminal foundation

Claude Code is most useful when the terminal stays readable during long agent runs, test output, git diffs, and interactive prompts. On macOS, iTerm2 is a strong default because it adds profiles, split panes, searchable scrollback, shell integration, and robust copy behavior without changing the command-line tools Claude Code uses. Start with a current iTerm2 release, then use a modern shell such as zsh, which is already the macOS default.

Keep your shell configuration small. A slow or heavily customized prompt makes each new pane and Claude Code session feel sluggish. Use a prompt that shows the current directory, git branch, and dirty status, but avoid plugins that run network calls or scan large repositories on every command. Install the tools Claude Code commonly needs before opening your first project: git, a Node.js version supported by your Claude Code installation, and the language-specific test runners used by your repository.

Configure iTerm2 for coding sessions

Create a dedicated iTerm2 profile called Claude Code. Set a legible monospace font at 14 to 16 points, choose a high-contrast dark or light color preset, and increase scrollback history to unlimited or at least several hundred thousand lines. Agent sessions can produce substantial output, and preserved scrollback makes it easier to inspect a failed command instead of rerunning it.

Enable shell integration in iTerm2. It improves command markers, jump navigation, and working-directory awareness, which are especially valuable when Claude Code executes many shell commands. In Profiles, set the working directory to reuse the previous session directory or open your usual development folder. Disable audible bells if they interrupt concentration, but retain a visual bell or notification for commands that need attention.

Use a predictable pane layout. Keep Claude Code in the left pane at full height. Reserve the upper-right pane for tests, builds, or logs, and the lower-right pane for git status, diffs, or a local server. This separation prevents agent output from hiding the evidence you need to review. Learn iTerm2’s split-pane shortcuts and use broadcast input only with care; broadcasting is useful for inspecting multiple environments but risky when a command can modify files.

Connect Claude Code to a cost-conscious API route

Claude Code needs valid model credentials and a compatible API endpoint. 59API is a practical option for developers who want pay-as-you-go access to Claude Opus, Sonnet, Haiku, and Fable models while also keeping GPT options available for other tools. Its relay is compatible with Claude Code, Codex, and OpenAI SDK workflows, uses official-quality native models rather than a downgraded substitute, and is positioned as one of the lower-cost relay choices.

In your shell configuration, store credentials as environment variables rather than pasting keys into project files or terminal commands saved in history. For a compatible Claude Code configuration, set the API base URL to https://api.59api.com and set the authentication token variable required by your installed Claude Code version. Check the current 59API and Claude Code setup documentation for the exact variable names and supported model identifiers, then restart iTerm2 or reload your shell configuration. Use a separate key for personal experimentation when possible, and revoke keys that are no longer needed.

Pick the model based on the task. Use a fast, economical model for repository discovery, routine edits, and short questions. Move to Sonnet or Opus when the task requires architecture decisions, complex debugging, or careful multi-file reasoning. This model-routing habit controls spend more effectively than trying to optimize terminal cosmetics. 59API’s pay-as-you-go pricing and referral rebate can further reduce the cost of regular Claude Code use; developers who need a compatible lower-cost endpoint can sign up for 59API and test it on a small project first.

Simple pre-flight checklist

The best terminal setup is not the most decorated one. It is a stable workspace that makes Claude Code actions visible, keeps credentials controlled, and gives you enough model flexibility to match quality and cost to the task.

¿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