Communitygithub.com

cli-anything-iterm2-ctl

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

Was ist cli-anything-iterm2-ctl?

cli-anything-iterm2-ctl is a Claude Code agent skill that 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.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-iterm2-ctl

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

cli-anything-iterm2

Stateful CLI harness for iTerm2. Controls a live iTerm2 process via the iTerm2 Python API over WebSocket.

Prerequisites

  1. macOS + iTerm2 running: brew install --cask iterm2
  2. Python API enabled: iTerm2 → Preferences → General → Magic → Enable Python API
  3. Install: pip install cli-anything-iterm2 (or pip install -e . from source)

Basic Syntax

cli-anything-iterm2 [--json] <group> <command> [OPTIONS] [ARGS]

Always use --json for machine-readable output (required for agent use).

Command Groups

GroupPurpose
appApp status, workspace snapshot, context management, app-level variables, modal dialogs, file panels
windowCreate, list, close, resize, fullscreen windows
tabCreate, list, close, activate tabs; navigate split panes by direction
sessionSend text, inject raw bytes, read screen, full scrollback, split panes, prompt detection
profileList profiles, get profile details, list/apply color presets
arrangementSave and restore window layouts
tmuxFull tmux -CC integration: bootstrap, connections, windows, commands
broadcastSync keystrokes across panes via broadcast domains
menuInvoke any iTerm2 menu item programmatically
prefRead/write global iTerm2 preferences; list all valid keys; tmux settings

Orienting in an Existing Workspace

Use app snapshot when you land in a session with existing panes and need to understand what's running without reading full screen contents for each pane:

cli-anything-iterm2 --json app snapshot

Returns name, current directory, foreground process, user.role label, and last visible output line for every session across all windows.

Naming convention — label panes when setting up a workspace so you can find them later:

cli-anything-iterm2 session set-var user.role "api-server"
cli-anything-iterm2 session set-var user.role "log-tail"
cli-anything-iterm2 session set-var user.role "editor"

app snapshot will surface these roles alongside process and path, giving you a full picture in one call.

Typical Agent Workflow

# 1. Orient — snapshot every session: name, path, process, role, last output line
cli-anything-iterm2 --json app snapshot

# 2. Establish context (saves window/tab/session IDs for subsequent commands)
cli-anything-iterm2 app current

# 3. Interact — no --session-id needed once context is set
cli-anything-iterm2 session send "git status"
cli-anything-iterm2 --json session scrollback --tail 200 --strip

# 4. Create a multi-pane workspace — label panes so snapshot identifies them later
cli-anything-iterm2 session split --vertical --use-as-context
cli-anything-iterm2 session send "python3 -m http.server 8000"
cli-anything-iterm2 session set-var user.role "http-server"

Reference Files

Read only what the task requires — each file is a single narrow concern (~10–30 lines):

FileRead when you need...
references/session-io.mdSend text, inject bytes, read screen/scrollback, get selection
references/session-control.mdSplit panes, activate/close sessions, resize, rename, session variables
references/session-shell-integration.mdwait-prompt, wait-command-end, get-prompt; reliable send→wait→read pattern
references/layout-window-tab.mdCreate/close/resize windows and tabs, navigate split panes
references/layout-arrangement.mdSave and restore window layouts
references/app-context.mdSnapshot (orientation), status, context management, app vars, modal dialogs, file panels
references/profile-pref.mdProfiles list/get/presets, preferences read/write, tmux pref shortcuts
references/broadcast-menu.mdBroadcast keystrokes to multiple panes, invoke menu items
references/tmux-commands.mdAll tmux CLI commands (bootstrap, send, tabs, create-window, set-visible)
references/tmux-guide.mdFull tmux -CC workflow, pane→session ID mapping
references/json-session.md--json schemas for session, window, tab, screen, scrollback, inject
references/json-tmux-app.md--json schemas for tmux, app dialogs, preferences, errors

REPL Mode

Run without arguments for an interactive REPL that maintains context between commands:

cli-anything-iterm2

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

Verwandte Skills