hkuds/cli-anything/cli-anything-iterm2-ctl
Claude Code and agent skill by hkuds/cli-anything
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install hkuds/cli-anything/cli-anything-iterm2-ctlSKILL.md
The same SKILL.md was published earlier as hkuds/cli-anything/cli-anything-iterm2-ctl.
cli-anything-iterm2
Stateful CLI harness for iTerm2. Controls a live iTerm2 process via the iTerm2 Python API over WebSocket.
Prerequisites
- macOS + iTerm2 running:
brew install --cask iterm2 - Python API enabled: iTerm2 → Preferences → General → Magic → Enable Python API
- Install:
pip install cli-anything-iterm2(orpip install -e .from source)
Basic Syntax
Always use --json for machine-readable output (required for agent use).
Command Groups
| Group | Purpose | |
|---|---|---|
app | App status, workspace snapshot, context management, app-level variables, modal dialogs, file panels | |
window | Create, list, close, resize, fullscreen windows | |
tab | Create, list, close, activate tabs; navigate split panes by direction | |
session | Send text, inject raw bytes, read screen, full scrollback, split panes, prompt detection | |
profile | List profiles, get profile details, list/apply color presets | |
arrangement | Save and restore window layouts | |
tmux | Full tmux -CC integration: bootstrap, connections, windows, commands | |
broadcast | Sync keystrokes across panes via broadcast domains | |
menu | Invoke any iTerm2 menu item programmatically | |
pref | Read/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:
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:
app snapshot will surface these roles alongside process and path, giving you a full picture in one call.
Typical Agent Workflow
Reference Files
Read only what the task requires — each file is a single narrow concern (~10–30 lines):
| File | Read when you need... | |
|---|---|---|
references/session-io.md | Send text, inject bytes, read screen/scrollback, get selection | |
references/session-control.md | Split panes, activate/close sessions, resize, rename, session variables | |
references/session-shell-integration.md | wait-prompt, wait-command-end, get-prompt; reliable send→wait→read pattern | |
references/layout-window-tab.md | Create/close/resize windows and tabs, navigate split panes | |
references/layout-arrangement.md | Save and restore window layouts | |
references/app-context.md | Snapshot (orientation), status, context management, app vars, modal dialogs, file panels | |
references/profile-pref.md | Profiles list/get/presets, preferences read/write, tmux pref shortcuts | |
references/broadcast-menu.md | Broadcast keystrokes to multiple panes, invoke menu items | |
references/tmux-commands.md | All tmux CLI commands (bootstrap, send, tabs, create-window, set-visible) | |
references/tmux-guide.md | Full 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:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cli-anything-iterm2-ctl/SKILL.md
Popularity
- Repository stars
- 44,699
- Repository forks
- 4,186
- 7-day trend score
- 54
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hkuds/cli-anything/cli-anything-iterm2-ctl)