跳到正文
cccskills
免费在 GitHub 公开

cli-anything-iterm2-ctl

Control a running iTerm2 workspace from the command line. See what each terminal pane is doing, send commands, read current and past output, arrange windows and tabs, manage tmux integration, and change preferences.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

查看安装方法

适用场景

  • See what is running in every terminal pane
  • Send commands and read terminal output history
  • Create and restore layouts with multiple panes
  • Send the same keystrokes to multiple panes

包含的文件(1)

  • SKILL.md5.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use Codex to build Python command-line tools for applications with graphical interfaces. Analyze source code, add commands, test against the actual software, validate packaging and documentation, and discover tools already generated or installed.

中文简介正在准备中。当前显示英语简介。

  • Build a command-line tool from application source code
  • Extend an existing tool with more commands
  • Test behavior against the actual application
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Use Reasonix to build or improve a Python command-line interface for existing software. The workflow covers source analysis, interactive commands, JSON output, tests, documentation, and installation checks using the software’s own backend where possible.

中文简介正在准备中。当前显示英语简介。

  • Build command-line access to a GUI application
  • Add missing features to an existing command-line interface
  • Test commands against the actual software backend
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Build and improve Python command interfaces for GUI applications with OpenClaw. The skill guides source analysis, command design, testing, and packaging, including interactive sessions and structured JSON output for agents.

中文简介正在准备中。当前显示英语简介。

  • Build a command interface for a GUI application
  • Add missing commands to an existing interface
  • Test workflows against the actual application
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Inspect and edit 3MF files for 3D printing. Detect cylindrical holes, change their diameters, repair mesh issues, and compare files while preserving BambuStudio and PrusaSlicer metadata when repacking the edited file.

中文简介正在准备中。当前显示英语简介。

  • Detect cylindrical holes and check their diameters
  • Resize selected holes to a target diameter
  • Repair degenerate faces and duplicate vertices
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Manage AdGuard Home network filtering from the command line. Update blocklists, register devices, configure DNS rules that map names to addresses, and inspect query logs and statistics through the AdGuard Home REST API.

中文简介正在准备中。当前显示英语简介。

  • Adding and refreshing ad-blocking filter lists
  • Mapping local domain names to IP addresses
  • Registering devices and managing fixed address assignments
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Generate slides, documents, websites, and diagrams from natural language prompts through AnyGen OpenAPI. Manage reference uploads, check generation progress, and download finished files using commands with structured output for AI agents.

中文简介正在准备中。当前显示英语简介。

  • Generate slides or documents from written instructions
  • Upload reference files for a generation task
  • Check generation progress and download finished files
HKUDS/CLI-Anything5.5万2026年9月22日 更新

查看 HKUDS 的全部技能

报告此技能的问题