This skill enables you to fully control the iTerm2 terminal emulator using its Python API. You can create windows, tabs, and splits, inject commands, read screen content, and interact with running applications (CLI/TUI/REPL).
Every script MUST begin with a comprehensive docstring covering: Tests, Verification Strategy, Screenshots, Key Bindings, and Usage. See examples/00-comprehensive-template.py for the canonical format.
| Get app | app = await iterm2.asyncgetapp(connection) | | Get window | window = app.currentterminalwindow | | New tab | tab = await window.asynccreatetab() | | Get session | session = tab.currentsession | | Send text | await session.asyncsendtext("ls\n") | | Read screen | screen = await session.asyncgetscreencontents() | | Get line | screen.line(i).string |
Guida iTerm2 a livello di programmazione utilizzando gli script Python per automatizzare le attività del terminale, eseguire test o gestire sessioni. Da utilizzare quando l'utente deve testare TUI, CLI, app terminale, automazione del terminale, test interattivo del terminale, UI del terminale, automazione dell'interfaccia della riga di comando, automazione REPL, monitoraggio dello schermo o screenshot del terminale. Supporta iTerm2 e l'automazione iterm. Fonte: indrasvat/claude-code-skills.