iterm2-driver

Drive the iTerm2 Python API to create windows, tabs, and splits, inject commands, read screen content, and capture screenshots.

3|1|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/indrasvat/claude-code-skills --skill iterm2-driver
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterm2-driver
Source: https://github.com/indrasvat/claude-code-skills/tree/main/skills/iterm2-driver
Command: npx skills add https://github.com/indrasvat/claude-code-skills --skill iterm2-driver

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Drive iTerm2 automation to reduce manual terminal tasks by programmatically controlling windows, tabs, and splits, sending commands, reading screen content, and capturing screenshots for verification and visual testing. This enables automation of CLI and TUI workflows, speeding up development, testing, and CI validation in macOS environments.

Core Features & Use Cases

  • Create isolated windows, tabs, and multi-pane layouts to mirror complex terminal infrastructure.
  • Inject commands, read outputs, and verify results across multiple sessions, including parallel agents.
  • Capture screenshots and drive visual testing to ensure UI stability during terminal automation.

Quick Start

Run a sample script with uv run iterm2-driver-sample.py to begin automating iTerm2 tasks end-to-end.

Frequently Asked Questions about iterm2-driver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate iTerm2 terminal tasks with Python?

Automate iTerm2 terminal tasks by using a Python driver to programmatically create windows, tabs, and splits, inject commands, read screen content, and capture screenshots for verification and visual testing workflows.

Can I create multi-pane iTerm2 layouts and run commands in parallel?

Yes, you can create isolated windows, tabs, and multi-pane layouts to mirror complex terminal infrastructure, inject commands, and verify results across multiple sessions including parallel agents.

How do I capture screenshots in iTerm2 for visual testing?

Capture screenshots for visual testing in iTerm2 by driving the Python API to read screen content and verify results, ensuring UI stability during terminal automation workflows.

Does iTerm2 automation support macOS CI validation for CLI and TUI workflows?

Yes, iTerm2 automation supports macOS environments by automating CLI and TUI workflows, which speeds up development, testing, and CI validation through reproducible terminal automation.

What is needed to start automating iTerm2 with a Python driver?

To start automating iTerm2, run the sample script using uv run iterm2-driver-sample.py, which demonstrates end-to-end terminal automation including safe window creation with readiness probes.