cli-anything-iterm2

Control iTerm2 windows, tabs, sessions, and preferences via WebSocket commands.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables the automation and control of live iTerm2 sessions, allowing users to send commands, manage workflows, and retrieve terminal output programmatically.

Core Features & Use Cases

  • Session Control: Send commands, read output, and manage pane splits within iTerm2 remotely.
  • Workspace Orientation: Snapshot current layout, identify sessions, and establish context without manual inspection.
  • Automation: Streamline workflows such as server management, scripting, and multi-pane arrangements through scripted commands. For example, automating the deployment process by opening a new window, running build commands, and monitoring logs in panes.

Quick Start

Use the CLI to snapshot your current iTerm2 environment and then send commands to a specific session for automation.

Frequently Asked Questions about cli-anything-iterm2

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

FAQPage Schema
How do I automate iTerm2 sessions and send commands programmatically?

To automate iTerm2 sessions, you can use the iTerm2 Python API and WebSocket commands to send terminal commands, manage pane splits, and retrieve output programmatically for macOS workflow automation.

Can I snapshot my current iTerm2 window layout and identify active sessions?

Yes, you can snapshot your current iTerm2 workspace layout to identify active sessions and establish context without manual inspection, enabling targeted session control and layout configuration for automation.

Do I need the iTerm2 Python API to control terminal workflows on macOS?

Yes, the iTerm2 Python API is required to control terminal workflows on macOS. It provides the necessary WebSocket command interface to manage windows, tabs, sessions, and preferences programmatically.

What is the best way to manage multi-pane arrangements for server deployment in iTerm2?

The best way to manage multi-pane arrangements for server deployment in iTerm2 is by using scripted commands to open new windows, run build commands, and monitor logs in panes through programmatic session control.

Does programmatic iTerm2 control support managing terminal preferences and tabs?

Yes, programmatic iTerm2 control supports managing terminal preferences, windows, tabs, and sessions through WebSocket commands, allowing comprehensive workspace orientation and automation for macOS terminal tasks.