cli-anything-iterm2-ctl

Manage iTerm2 terminal sessions via the Python API.

46.8k|4.4k|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/HKUDS/CLI-Anything --skill cli-anything-iterm2-ctl-hkuds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-anything-iterm2-ctl
Source: https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-iterm2-ctl
Command: npx skills add https://github.com/HKUDS/CLI-Anything --skill cli-anything-iterm2-ctl-hkuds

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires iterm2, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Manages live iTerm2 sessions using Python API calls to streamline terminal workflows.

Core Features & Use Cases

  • Session Control: Send commands, read output, split panes, and manage window layouts.
  • Workspace Snapshot: Capture current session states including process info and directories.
  • Automation: Automate routine tasks like launching apps, organizing panes, and configuring preferences.
  • Real-World Example: Automate deployment workflows by controlling multiple terminal sessions for build, test, and deployment.

Quick Start

Use the CLI to capture a snapshot of all iTerm2 sessions and identify running processes.

Frequently Asked Questions about cli-anything-iterm2-ctl

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

FAQPage Schema
How do I automate iTerm2 session management with a Python API?

You can automate iTerm2 session management by using Python API calls to send commands, split panes, and manage window layouts. This allows developers to script sophisticated terminal workflows and automate routine tasks.

Can I capture an iTerm2 workspace snapshot of running processes and directories?

Yes, you can capture a workspace snapshot of current iTerm2 session states. This snapshot identifies running processes and captures directory information, providing a clear overview of your active terminal environment.

How do I control multiple terminal sessions for deployment workflows in macOS?

You can control multiple terminal sessions for macOS deployment workflows by using the iTerm2 Python API. It enables you to orchestrate build, test, and deployment commands across different panes simultaneously.

Do I need Python dependencies to script iTerm2 terminal automation?

Yes, you need Python dependencies and the specific iTerm2 Python API installed to execute terminal automation. A macOS environment is also required to reliably run session commands and manage layouts.

What is the best way to organize iTerm2 panes and configure preferences automatically?

The best way to organize panes and configure preferences automatically is through Python scripting. By leveraging the iTerm2 Python API, you can programmatically arrange layouts and apply preference configurations.

Are there limitations when managing live iTerm2 sessions via Python scripts?

Managing live iTerm2 sessions via Python scripts is limited to macOS environments and requires the iTerm2 Python API. Session control reliability depends on having the correct Python dependencies installed.