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: 2. Python API enabled : iTerm2 → Preferences → General → Magic → Enable Python API 3. Install : (or from source) Basic Syntax Always use for machine-readable output (required for agent use). Command Groups | Group | Purpose | |-------|---------| | | App status, workspace snapshot, context management, app-level variables, modal dialogs, file panels | | | Create, list, close, resize, fullscreen windows | | | Create, list, close, a…

\\x1b[2J' # escape sequence\ncli-anything-iterm2 session inject \"1b5b324a\" --hex # same in hex\n\n# Read visible screen — ALWAYS use --json, output is silently empty without it\ncli-anything-iterm2 --json session screen # visible area only\ncli-anything-iterm2 --json session screen --lines 20\n\n# Read full history\ncli-anything-iterm2 --json session scrollback\ncli-anything-iterm2 --json session scrollback --tail 100\ncli-anything-iterm2 --json session scrollback --tail 500 --strip # no null bytes\ncli-anything-iterm2 --json session scrollback --lines 200 # first 200 lines\n\n# Get selected text\ncli-anything-iterm2 session selection\n```\n\n`session screen` = visible area only. `session scrollback` = entire history, atomically, oldest→newest.\n`overflow` in scrollback response = lines lost when buffer was full (set profile limit to \"unlimited\" to avoid).\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1172,"content_sha256":"6aaf9628afe1b13673f77905ed1d72778ee5b418180ebb0b4982c693775f69e9"},{"filename":"references/session-shell-integration.md","content":"# Shell Integration\n\nRequires: `curl -L https://iterm2.com/shell_integration/install_shell_integration.sh | bash`\n\n```bash\ncli-anything-iterm2 session get-prompt # last prompt: command, cwd, state\ncli-anything-iterm2 session wait-prompt --timeout 30 # block until next prompt appears\ncli-anything-iterm2 session wait-command-end --timeout 120 # block until exit; returns exit_status\n```\n\n**Reliable execution pattern** (send → wait → read):\n```bash\ncli-anything-iterm2 session send \"make build\"\ncli-anything-iterm2 session wait-command-end --timeout 120\ncli-anything-iterm2 --json session scrollback --tail 50 --strip\n```\n\n`wait-command-end` returns `{\"session_id\": \"...\", \"exit_status\": 0, \"timed_out\": false}`.\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":736,"content_sha256":"993bf9f0d4354001f9623d10577b13bc5006e394800bb0253de78801e04ae8a9"},{"filename":"references/tmux-commands.md","content":"# tmux Commands\n\n```bash\ncli-anything-iterm2 tmux bootstrap # start tmux -CC, wait for connection\ncli-anything-iterm2 tmux bootstrap --attach # attach to existing session\ncli-anything-iterm2 tmux bootstrap --session-id \u003cid> --timeout 15\ncli-anything-iterm2 tmux list # active tmux -CC connections\ncli-anything-iterm2 tmux tabs # iTerm2 tabs backed by tmux\ncli-anything-iterm2 tmux create-window # new tmux window → iTerm2 tab\ncli-anything-iterm2 tmux create-window --use-as-context\ncli-anything-iterm2 tmux set-visible @1 off|on # hide/show a tmux window's tab\n\n# tmux protocol commands (sent to tmux server, not to a pane)\ncli-anything-iterm2 tmux send \"list-sessions\"\ncli-anything-iterm2 tmux send \"list-windows -a\"\ncli-anything-iterm2 tmux send \"list-panes -a -F '#{session_name}:#{window_index}:#{pane_index} #{pane_current_command} #{pane_current_path}'\"\ncli-anything-iterm2 tmux send \"new-window -n work\"\ncli-anything-iterm2 tmux send \"rename-session dev\"\ncli-anything-iterm2 tmux send \"split-window -h\"\ncli-anything-iterm2 tmux send \"select-pane -t 0\"\ncli-anything-iterm2 session run-tmux-cmd \"rename-window mywork\"\n```\n\n**Key distinction:** `tmux send` = tmux protocol commands (to tmux server). `session send` = shell text to a specific pane. Use both together.\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1378,"content_sha256":"318015e91f5c49b13f50c485e3bd194e20bae0fc0be7824723211668cce4699b"},{"filename":"references/tmux-guide.md","content":"# tmux -CC Workflow Guide\n\ntmux -CC renders each tmux window as a native iTerm2 tab — fully visible, readable, and controllable.\n\n## Full workflow\n```bash\n# 1. Set context to the target session BEFORE bootstrapping — otherwise bootstrap times out\ncli-anything-iterm2 app set-context --session-id \u003cid>\n\n# 2. Bootstrap\ncli-anything-iterm2 --json tmux bootstrap\n\n# 2. Enumerate\ncli-anything-iterm2 --json tmux send \"list-sessions\"\ncli-anything-iterm2 --json tmux send \"list-panes -a -F '#{session_name}:#{window_index}:#{pane_index} #{pane_current_command} #{pane_current_path}'\"\ncli-anything-iterm2 --json tmux tabs # maps tmux windows → iTerm2 tab IDs\n\n# 3. Read any pane\ncli-anything-iterm2 --json session screen --session-id \u003cpane-session-id>\ncli-anything-iterm2 --json session scrollback --session-id \u003cpane-session-id> --tail 500 --strip\n\n# 4. Send to any pane\ncli-anything-iterm2 session send \"git log --oneline -10\" --session-id \u003cpane-session-id>\n\n# 5. Manage layout\ncli-anything-iterm2 tmux send \"new-window -n logs\"\ncli-anything-iterm2 tmux send \"split-window -h -t logs\"\ncli-anything-iterm2 tmux send \"select-layout -t logs even-horizontal\"\ncli-anything-iterm2 tmux create-window --use-as-context\n```\n\n## Mapping tmux panes → iTerm2 session IDs\ntmux panes don't directly expose iTerm2 session IDs. Cross-reference:\n```bash\ncli-anything-iterm2 --json tmux tabs # → tab_id per tmux window\ncli-anything-iterm2 --json app status # → session_id per tab_id\n```\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1488,"content_sha256":"a53ec6af1f36f63534f00759d5fd036df00610a2ad00ae59360cb9f83aca175e"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"cli-anything-iterm2","type":"text"}]},{"type":"paragraph","content":[{"text":"Stateful CLI harness for iTerm2. Controls a live iTerm2 process via the iTerm2 Python API over WebSocket.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Prerequisites","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"macOS + iTerm2","type":"text","marks":[{"type":"strong"}]},{"text":" running: ","type":"text"},{"text":"brew install --cask iterm2","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Python API enabled","type":"text","marks":[{"type":"strong"}]},{"text":": iTerm2 → Preferences → General → Magic → Enable Python API","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Install","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"pip install cli-anything-iterm2","type":"text","marks":[{"type":"code_inline"}]},{"text":" (or ","type":"text"},{"text":"pip install -e .","type":"text","marks":[{"type":"code_inline"}]},{"text":" from source)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Basic Syntax","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"cli-anything-iterm2 [--json] \u003cgroup> \u003ccommand> [OPTIONS] [ARGS]","type":"text"}]},{"type":"paragraph","content":[{"text":"Always use ","type":"text"},{"text":"--json","type":"text","marks":[{"type":"code_inline"}]},{"text":" for machine-readable output (required for agent use).","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Command Groups","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Group","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Purpose","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"app","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"App status, workspace snapshot, context management, app-level variables, modal dialogs, file panels","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"window","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Create, list, close, resize, fullscreen windows","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"tab","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Create, list, close, activate tabs; navigate split panes by direction","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"session","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Send text, inject raw bytes, read screen, full scrollback, split panes, prompt detection","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"profile","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"List profiles, get profile details, list/apply color presets","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"arrangement","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Save and restore window layouts","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"tmux","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Full tmux -CC integration: bootstrap, connections, windows, commands","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"broadcast","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Sync keystrokes across panes via broadcast domains","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"menu","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Invoke any iTerm2 menu item programmatically","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pref","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Read/write global iTerm2 preferences; list all valid keys; tmux settings","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Orienting in an Existing Workspace","type":"text"}]},{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"app snapshot","type":"text","marks":[{"type":"code_inline"}]},{"text":" when you land in a session with existing panes and need to understand what's running without reading full screen contents for each pane:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"cli-anything-iterm2 --json app snapshot","type":"text"}]},{"type":"paragraph","content":[{"text":"Returns name, current directory, foreground process, ","type":"text"},{"text":"user.role","type":"text","marks":[{"type":"code_inline"}]},{"text":" label, and last visible output line for every session across all windows.","type":"text"}]},{"type":"paragraph","content":[{"text":"Naming convention","type":"text","marks":[{"type":"strong"}]},{"text":" — label panes when setting up a workspace so you can find them later:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"cli-anything-iterm2 session set-var user.role \"api-server\"\ncli-anything-iterm2 session set-var user.role \"log-tail\"\ncli-anything-iterm2 session set-var user.role \"editor\"","type":"text"}]},{"type":"paragraph","content":[{"text":"app snapshot","type":"text","marks":[{"type":"code_inline"}]},{"text":" will surface these roles alongside process and path, giving you a full picture in one call.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Typical Agent Workflow","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# 1. Orient — snapshot every session: name, path, process, role, last output line\ncli-anything-iterm2 --json app snapshot\n\n# 2. Establish context (saves window/tab/session IDs for subsequent commands)\ncli-anything-iterm2 app current\n\n# 3. Interact — no --session-id needed once context is set\ncli-anything-iterm2 session send \"git status\"\ncli-anything-iterm2 --json session scrollback --tail 200 --strip\n\n# 4. Create a multi-pane workspace — label panes so snapshot identifies them later\ncli-anything-iterm2 session split --vertical --use-as-context\ncli-anything-iterm2 session send \"python3 -m http.server 8000\"\ncli-anything-iterm2 session set-var user.role \"http-server\"","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Files","type":"text"}]},{"type":"paragraph","content":[{"text":"Read only what the task requires — each file is a single narrow concern (~10–30 lines):","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"File","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Read when you need...","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/session-io.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Send text, inject bytes, read screen/scrollback, get selection","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/session-control.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Split panes, activate/close sessions, resize, rename, session variables","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/session-shell-integration.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"wait-prompt, wait-command-end, get-prompt; reliable send→wait→read pattern","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/layout-window-tab.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Create/close/resize windows and tabs, navigate split panes","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/layout-arrangement.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Save and restore window layouts","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/app-context.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Snapshot","type":"text","marks":[{"type":"strong"}]},{"text":" (orientation), status, context management, app vars, modal dialogs, file panels","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/profile-pref.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Profiles list/get/presets, preferences read/write, tmux pref shortcuts","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/broadcast-menu.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Broadcast keystrokes to multiple panes, invoke menu items","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/tmux-commands.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"All tmux CLI commands (bootstrap, send, tabs, create-window, set-visible)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/tmux-guide.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Full tmux -CC workflow, pane→session ID mapping","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/json-session.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--json","type":"text","marks":[{"type":"code_inline"}]},{"text":" schemas for session, window, tab, screen, scrollback, inject","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/json-tmux-app.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--json","type":"text","marks":[{"type":"code_inline"}]},{"text":" schemas for tmux, app dialogs, preferences, errors","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"REPL Mode","type":"text"}]},{"type":"paragraph","content":[{"text":"Run without arguments for an interactive REPL that maintains context between commands:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"cli-anything-iterm2","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"cli-anything-iterm2","author":"@skillopedia","source":{"stars":41649,"repo_name":"cli-anything","origin_url":"https://github.com/hkuds/cli-anything/blob/HEAD/iterm2/agent-harness/cli_anything/iterm2_ctl/skills/SKILL.md","repo_owner":"hkuds","body_sha256":"c64a182578ca19f416502dea0862f30623b94391108b641daf6807fe40f1e703","cluster_key":"2cf418a044baf1322b849192c2fd0a58dcc89c26a9a5fe7d18003ec6e43f8df4","clean_bundle":{"format":"clean-skill-bundle-v1","source":"hkuds/cli-anything/iterm2/agent-harness/cli_anything/iterm2_ctl/skills/SKILL.md","attachments":[{"id":"cc4ebe71-20eb-5561-8aa4-00568a6ac7c2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/cc4ebe71-20eb-5561-8aa4-00568a6ac7c2/attachment.md","path":"references/app-context.md","size":1543,"sha256":"d5a17b39cc88fd817d1d5e1f3851d72a84401fde7b6559a8e38910d8a184532c","contentType":"text/markdown; charset=utf-8"},{"id":"c0755d81-3959-5b0d-b47d-8f9512e0cb4c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c0755d81-3959-5b0d-b47d-8f9512e0cb4c/attachment.md","path":"references/broadcast-menu.md","size":933,"sha256":"0594ec91773948c74f08e8b54dd96328f8bc18c440e72640870e4a040c195fe5","contentType":"text/markdown; charset=utf-8"},{"id":"d561c7ca-fcda-5c98-bf7b-ef311fbd0aa3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d561c7ca-fcda-5c98-bf7b-ef311fbd0aa3/attachment.md","path":"references/json-session.md","size":1668,"sha256":"224e77579dd414a4520a7ebbf85dba02b13369f90f2e56546ca96f3860e92fb1","contentType":"text/markdown; charset=utf-8"},{"id":"0a752e2e-55b1-5dfd-8cc6-da53274ae191","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0a752e2e-55b1-5dfd-8cc6-da53274ae191/attachment.md","path":"references/json-tmux-app.md","size":1384,"sha256":"444dad7dcabe167ebb3f5cbba5f5b18da090990939cd87c41e4cae1a13ad3934","contentType":"text/markdown; charset=utf-8"},{"id":"012ca758-1959-5d88-8a9f-2ba5d2058b9a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/012ca758-1959-5d88-8a9f-2ba5d2058b9a/attachment.md","path":"references/layout-arrangement.md","size":259,"sha256":"9b5590e04a5736aecf4d806c7cc8849be6d3baf2394544cc65f000fe580684ff","contentType":"text/markdown; charset=utf-8"},{"id":"3cf93efd-8e07-5bbd-bb30-0c8a02896b02","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/3cf93efd-8e07-5bbd-bb30-0c8a02896b02/attachment.md","path":"references/layout-window-tab.md","size":961,"sha256":"1221ec7d0c35dd7a59b0ed13ad8acfc1c81e12333a8dae579c171a6ffa72a97c","contentType":"text/markdown; charset=utf-8"},{"id":"fab974dc-3682-554a-b817-87cbeffaabf8","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/fab974dc-3682-554a-b817-87cbeffaabf8/attachment.md","path":"references/profile-pref.md","size":1068,"sha256":"d84a6c996c5d22e21d8ec3ce5886441646f1f7cb86801a4e734a58c88f25aa5f","contentType":"text/markdown; charset=utf-8"},{"id":"2c19c10d-9e7e-5b03-9052-b22cd524b8d6","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2c19c10d-9e7e-5b03-9052-b22cd524b8d6/attachment.md","path":"references/session-control.md","size":942,"sha256":"e4766abf54132e2f8e94e9d0daf0a10e54130fdb5ed41977e9a2e5eede4a3529","contentType":"text/markdown; charset=utf-8"},{"id":"76832fe9-5b45-513a-80d9-e2277f197453","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/76832fe9-5b45-513a-80d9-e2277f197453/attachment.md","path":"references/session-io.md","size":1172,"sha256":"6aaf9628afe1b13673f77905ed1d72778ee5b418180ebb0b4982c693775f69e9","contentType":"text/markdown; charset=utf-8"},{"id":"1f08bb5e-76aa-5293-a9be-a1d567cba54b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/1f08bb5e-76aa-5293-a9be-a1d567cba54b/attachment.md","path":"references/session-shell-integration.md","size":736,"sha256":"993bf9f0d4354001f9623d10577b13bc5006e394800bb0253de78801e04ae8a9","contentType":"text/markdown; charset=utf-8"},{"id":"8d1440ac-d193-566c-887c-52276b12548d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/8d1440ac-d193-566c-887c-52276b12548d/attachment.md","path":"references/tmux-commands.md","size":1378,"sha256":"318015e91f5c49b13f50c485e3bd194e20bae0fc0be7824723211668cce4699b","contentType":"text/markdown; charset=utf-8"},{"id":"f3caa26c-0866-5b9e-909a-1eaf7e136745","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f3caa26c-0866-5b9e-909a-1eaf7e136745/attachment.md","path":"references/tmux-guide.md","size":1488,"sha256":"a53ec6af1f36f63534f00759d5fd036df00610a2ad00ae59360cb9f83aca175e","contentType":"text/markdown; charset=utf-8"}],"bundle_sha256":"0f5ff92f0ddafd09fd06c6b4235e519ebc0edee296f3d9f149bd05e2d7f324db","attachment_count":12,"text_attachments":12,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":3,"skill_md_path":"iterm2/agent-harness/cli_anything/iterm2_ctl/skills/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"design-ux","category_label":"Design"},"exact_dupes_collapsed_into_this":2},"version":"v1","category":"design-ux","import_tag":"clean-skills-v1","description":"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."}},"renderedAt":1782987163049}

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: 2. Python API enabled : iTerm2 → Preferences → General → Magic → Enable Python API 3. Install : (or from source) Basic Syntax Always use for machine-readable output (required for agent use). Command Groups | Group | Purpose | |-------|---------| | | App status, workspace snapshot, context management, app-level variables, modal dialogs, file panels | | | Create, list, close, resize, fullscreen windows | | | Create, list, close, a…