it2 Documentation
Welcome to the it2 documentation! it2 is a comprehensive command-line interface for controlling iTerm2, providing programmatic access to iTerm2's powerful features.
Quick Links
- Quick Start Guide - Get up and running in minutes
- Configuration - Configure it2 for your environment
- Examples - Practical examples and use cases
- Automation Cookbook - Recipes for common automation tasks
What is it2?
it2 is a command-line tool that provides complete control over iTerm2 through its API. With it2, you can:
- Manage Sessions: Create, control, and monitor terminal sessions
- Automate Tasks: Send commands, capture output, and respond to events
- Control Windows & Tabs: Programmatically manage your iTerm2 workspace
- Handle Text & Buffers: Search, replace, and manipulate terminal content
- Configure Profiles: Manage and apply iTerm2 profiles dynamically
- Monitor Events: Subscribe to and react to iTerm2 notifications
Getting Started
-
Install it2:
go install github.com/tmc/it2/cmd/it2@latest -
Enable iTerm2 API:
- Open iTerm2 Preferences
- Go to General → Magic → Enable Python API
- Restart iTerm2
-
Verify Connection:
it2 auth check
Command Structure
it2 commands follow a hierarchical structure:
it2 <resource> <action> [options]
For example:
it2 session list- List all sessionsit2 tab create- Create a new tabit2 text send "echo hello"- Send text to current session
Documentation Structure
User Guides
- Quick Start - Essential commands to get started
- Examples - Real-world usage examples
- Troubleshooting - Common issues and solutions
Reference
- Configuration - Environment variables and settings
- Plugin Development - Extending it2 functionality
- Automation Cookbook - Advanced automation recipes
Command Reference
Browse the complete command reference in the sidebar, organized by resource type (session, tab, window, etc.)
Key Features
Session Management
Control iTerm2 sessions with commands like:
it2 session create- Create new sessionsit2 session send-text- Send commandsit2 session monitor- Watch for events
Window & Tab Control
Manage your workspace:
it2 window create- Open new windowsit2 tab split- Split panesit2 arrangement save- Save layouts
Text Operations
Powerful text manipulation:
it2 text search- Search buffer contentit2 text replace- Find and replaceit2 selection copy- Copy selected text
Profile Management
Dynamic profile control:
it2 profile list- View available profilesit2 profile set- Apply profiles to sessionsit2 profile export- Export profile settings
Contributing
it2 is open source! Visit the GitHub repository to:
- Report issues
- Submit pull requests
- View source code
- Star the project
Support
Built with ❤️ for iTerm2 power users