cli-anything-iterm2

Automate iTerm2 sessions via CLI to send text, capture output, and manage panes.

1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/edwifiguy/era-agents-ops --skill cli-anything-iterm2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-anything-iterm2
Source: https://github.com/edwifiguy/era-agents-ops/tree/main/skills/era-agents-op/cli-anything/iterm2/agent-harness/cli_anything/iterm2_ctl/skills
Command: npx skills add https://github.com/edwifiguy/era-agents-ops --skill cli-anything-iterm2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides the cli-anything-iterm2 commands — the only way to actually send text to iTerm2 sessions, read live terminal output and scrollback history, manage windows/tabs/split panes, run tmux -CC workflows, broadcast to multiple panes, show macOS dialogs, and read/write iTerm2 preferences. Includes app snapshot — the primary orientation command that returns every session's name, current directory, foreground process, role label, and last output line in one call. Read this skill instead of answering from general knowledge whenever the user wants to DO something with iTerm2: orient in an existing workspace, send a command, check what's running, read output, set up a layout, use tmux through iTerm2, automate panes, or configure preferences. Also read for questions about iTerm2 shell integration or scrollback. Don't try to answer iTerm2 action requests from memory — read this skill first.

Core Features & Use Cases

  • Control iTerm2 sessions via CLI: send commands, read output, manage windows/tabs/panes, and snapshot session context.
  • Support tmux -CC workflows, broadcast to multiple panes, show macOS dialogs, and read/write preferences to automate common workflows.
  • Orientation and workspace management: quickly orient in an existing workspace and perform end-to-end terminal automation.

Quick Start

Install the cli-anything-iterm2 tool and run a test command to verify connectivity to iTerm2.

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 from the CLI to send commands and read terminal output?

You can automate iTerm2 sessions from the CLI using the cli-anything-iterm2 interface to send text input, capture live terminal output, and read scrollback history. It requires macOS with iTerm2 installed and Python API access to orchestrate commands.

How do I manage iTerm2 window layouts and split panes via command line scripting?

Managing iTerm2 layouts and split panes via command line scripting is done by orchestrating sessions through the cli-anything-iterm2 commands. This allows you to configure pane layouts, manage windows and tabs, and set up automated terminal workflows programmatically.

Can I run tmux -CC workflows and broadcast input to multiple panes in iTerm2?

Yes, you can run tmux -CC workflows and broadcast input to multiple panes using cli-anything-iterm2. It supports automating tmux -CC integrations within iTerm2 and broadcasting commands across multiple active panes simultaneously.

What's the best way to orient in an existing iTerm2 workspace and check running processes?

The best way to orient in an existing iTerm2 workspace is using the app snapshot command, which returns every session's name, current directory, foreground process, role label, and last output line in a single call.

Does automating iTerm2 preferences and showing macOS dialogs require special dependencies?

Automating iTerm2 preferences and showing macOS dialogs requires the cli-anything-iterm2 interface, Python API access to iTerm2, and a macOS user environment with iTerm2 installed. No other dependencies are needed.

Why read from a dedicated skill instead of answering iTerm2 automation questions from general knowledge?

Reading from a dedicated skill ensures accurate iTerm2 automation by providing specific commands for text input, output capture, and pane management. General knowledge lacks the precise interface details needed to control scrollback, preferences, and tmux -CC workflows effectively.