At a Glance:
iTerm2 is a macOS-native terminal emulator and tmux alternative that supports tmux integration, shell integration, AI chat, inline images, and automatic profile switching.
Overview:
iTerm2 is a terminal emulator built specifically for macOS, designed to replace the default Terminal app with a more feature-rich environment. It provides native window and tab management, integrates deeply with the shell to track commands and directories, and offers visual features like inline images and automatic profile switching. Users who work with remote servers can use tmux integration to manage persistent sessions that survive crashes and disconnects. The application also includes a Python scripting API for customization, a built-in web browser, and an AI chat feature that can interact with terminal contents. It is suited for developers and system administrators who spend significant time in the command line on macOS.
Key Decision Points:
macOS only: iTerm2 is a native macOS application and does not support other operating systems.
tmux integration mode: Users can run tmux -CC to replace tmux's text-based interface with native iTerm2 windows and tabs, with session persistence across crashes and SSH disconnects.
Python scripting API: The application can be extended and automated through a Python API, enabling custom status bar components, triggers, and menu items.
Built-in browser: A web browser is integrated into the window/tab/pane hierarchy, and terminal features like triggers and copy mode work within browser sessions.
Core Features:
Tmux integration: Native iTerm2 windows and tabs replace tmux's text-based interface, supporting persistent sessions and collaborative sessions where two people can attach to the same session.
Shell integration: Tracks commands, directories, hostnames, and usernames, enabling click-to-download files via SCP, drag-and-drop uploads, and per-host command history.
AI chat: A built-in LLM chat window that can link to sessions, provide context-aware help, run commands, or explain output with annotations.
Inline images: Displays images, including animated GIFs, directly in the terminal using imgcat or similar tools.
Automatic profile switching: Terminal appearance changes automatically based on hostname, username, directory, or running command.
Session restoration: Sessions run in long-lived server processes, so shells keep running if iTerm2 crashes or upgrades, reconnecting on restart.
Use Cases:
Developers using tmux on remote servers: Run tmux -CC to manage persistent remote sessions with native macOS window management instead of tmux's text-based interface.
Command-line users who want shell awareness: Use shell integration to track directories and commands, download files with clicks, and navigate recent directories by frequency and recency.
Developers who want terminal automation: Use the Python scripting API to build custom triggers, status bar components, menu items, or automation routines.
Users who want context-aware terminal AI: Chat with an LLM about terminal contents, get command suggestions, or have output explained with inline annotations.
Open-Source Alternative Value:
iTerm2 provides source-available terminal emulation on macOS, offering an alternative to the built-in Terminal app with features like tmux integration, shell integration, and a Python scripting API. Users who prefer open-source software can inspect and build from source, and the Python API allows developers to extend the application with custom components, triggers, and automation. The tmux integration mode offers a different approach to persistent remote sessions compared to running tmux directly, and the session restoration model keeps shells alive through application crashes and upgrades.




