Skip to content

iTerm2 Terminal Control

Lets an agent orient in, type into, and read output from live iTerm2 terminal sessions on macOS.

Stars
58,084
Licence
Apache-2.0
Files
1 file

What it does

Once installed, the agent stops guessing about iTerm2 and instead uses a command-line tool that talks to your running iTerm2 app. It can take a snapshot of every open terminal pane (directory, running process, last output line), send commands into a chosen pane, read screen or scrollback text, split panes, manage windows and tabs, and drive tmux sessions. It can also read and change iTerm2 preferences and show macOS dialogs.

Great for

  • Developers who want an AI agent to run commands in their existing iTerm2 workspace
  • People automating multi-pane dev setups such as a server, log tail and editor side by side
  • Users of tmux -CC inside iTerm2 who want agent help managing it

Skip it if

  • Users not on macOS or not using iTerm2, since the tool depends on both
  • Situations where an agent should not type commands into a shared or production terminal without review, because sent text runs with the user's permissions
  • Users who only want general answers about terminals; the skill is for taking actions in iTerm2

Try asking

  • “Show me what's running in all my iTerm2 panes right now”
  • “Send 'git status' to the pane running my API server and show me the output”
  • “Split my current tab vertically and start a Python HTTP server on port 8000”
  • “Read the last 200 lines of scrollback from the log-tail pane and summarise errors”
Step-by-step guide: how to use iTerm2 Terminal ControlInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    cli-anything-iterm2-ctl.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip cli-anything-iterm2-ctl.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip cli-anything-iterm2-ctl.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run the snapshot command first so the agent can find the right pane before sending anything.
  • Label panes with user.role variables so the agent can identify them later.
  • Review commands before the agent sends them to panes that run servers, databases or deployments.

What's inside

  • SKILL.md

Redistributed unmodified from HKUDS/CLI-Anything under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.