Python API

iTerm2 offers a Python package which makes it easy to write Python scripts that control iTerm2 and extend its behavior.


During the Beta period, APIs may change occasionally.

Getting Started

Start by following the tutorial, which gives a step-by-step guide to writing a script and describes the architecture of iTerm2’s scripting system.

Example Code

Visit the examples for a collection of working examples.

Indices and tables