Communitygithub.com

cli-anything-iterm2

iTerm2를 위한 상태 기반 CLI 도구로, Python API와 WebSocket을 통해 iTerm2 세션에 텍스트 전송, 라이브 출력 읽기, 창/탭/분할 창 관리, tmux -CC 워크플로 등을 제공합니다.

cli-anything-iterm2란 무엇인가요?

cli-anything-iterm2는 macOS에서 iTerm2를 프로그래밍 방식으로 제어할 수 있는 강력한 CLI 도구입니다. 이 스킬은 AI 에이전트(Claude Code, Cursor 등)가 iTerm2의 라이브 터미널 세션과 직접 상호작용할 수 있도록 해주며, 텍스트 전송, 화면 출력 읽기, 스크롤백 기록 검색, 창/탭/분할 창 관리 등 모든 주요 기능을 지원합니다. 특히 `app snapshot` 명령어는 모든 세션의 이름, 현재 디렉터리, 포그라운드 프로세스, 사용자 정의 역할 레이블, 마지막 출력 줄을 한 번에 반환하여 에이전트가 기존 워크스페이스를 빠르게 파악할 수 있게 합니다. 또한 tmux -CC 통합, 브로드캐스트 도메인을 통한 다중 창 동기화, macOS 다이얼로그, iTerm2 환경설정 읽기/쓰기 등 고급 기능을 제공하며, REPL 모드를 통해 대화형으로 사용할 수 있습니다. 이 도구는 JSON 출력(`--json`)을 지원하여 AI 에이전트가 구조화된 데이터를 쉽게 처리할 수 있도록 설계되었습니다.

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

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

cli-anything-iterm2은(는) 무엇을 하나요?

iTerm2를 위한 상태 기반 CLI 도구입니다. iTerm2 Python API를 WebSocket 통해 라이브 iTerm2 프로세스를 제어합니다.

사전 요구 사항

  1. macOS + iTerm2 실행 중: brew install --cask iterm2
  2. Python API 활성화: iTerm2 → 환경설정 → 일반 → Magic → Python API 활성화
  3. 설치: pip install cli-anything-iterm2 (또는 소스에서 pip install -e .)

기본 문법

cli-anything-iterm2 [--json] <그룹> <명령어> [옵션] [인수]

기계가 읽을 수 있는 출력(에이전트 사용에 필수)을 위해 항상 --json을 사용하세요.

명령어 그룹

그룹목적
app앱 상태, 워크스페이스 스냅샷, 컨텍스트 관리, 앱 수준 변수, 모달 다이얼로그, 파일 패널
window창 생성, 목록, 닫기, 크기 조정, 전체화면
tab탭 생성, 목록, 닫기, 활성화; 방향별 분할 창 탐색
session텍스트 전송, 원시 바이트 주입, 화면 읽기, 전체 스크롤백, 분할 창, 프롬프트 감지
profile프로필 목록, 프로필 세부 정보, 색상 프리셋 목록/적용
arrangement창 레이아웃 저장 및 복원
tmux전체 tmux -CC 통합: 부트스트랩, 연결, 창, 명령어
broadcast브로드캐스트 도메인을 통한 키 입력 동기화
menuiTerm2 메뉴 항목을 프로그래밍 방식으로 호출
pref전역 iTerm2 환경설정 읽기/쓰기; 유효한 모든 키 목록; tmux 설정

기존 워크스페이스에서 방향 잡기

기존 창이 있는 세션에 진입했을 때 각 창의 전체 화면 내용을 읽지 않고도 실행 중인 내용을 파악해야 한다면 app snapshot을 사용하세요:

cli-anything-iterm2 --json app snapshot

모든 창의 모든 세션에 대해 이름, 현재 디렉터리, 포그라운드 프로세스, user.role 레이블, 마지막 가시 출력 줄을 반환합니다.

명명 규칙 — 워크스페이스를 설정할 때 창에 레이블을 지정하면 나중에 쉽게 찾을 수 있습니다:

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은 이러한 역할을 프로세스 및 경로와 함께 표시하여 한 번의 호출로 전체 그림을 제공합니다.

일반적인 에이전트 워크플로

# 1. 방향 잡기 — 모든 세션 스냅샷: 이름, 경로, 프로세스, 역할, 마지막 출력 줄
cli-anything-iterm2 --json app snapshot

# 2. 컨텍스트 설정 (이후 명령어를 위한 창/탭/세션 ID 저장)
cli-anything-iterm2 app current

# 3. 상호작용 — 컨텍스트가 설정되면 --session-id 불필요
cli-anything-iterm2 session send "git status"
cli-anything-iterm2 --json session scrollback --tail 200 --strip

# 4. 다중 창 워크스페이스 생성 — 스냅샷이 나중에 식별할 수 있도록 창에 레이블 지정
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"

참조 파일

작업에 필요한 파일만 읽으세요 — 각 파일은 하나의 좁은 관심사(약 10–30줄)로 구성되어 있습니다:

파일다음이 필요할 때 읽으세요...
references/session-io.md텍스트 전송, 바이트 주입, 화면/스크롤백 읽기, 선택 영역 가져오기
references/session-control.md분할 창, 세션 활성화/닫기, 크기 조정, 이름 변경, 세션 변수
references/session-shell-integration.mdwait-prompt, wait-command-end, get-prompt; 안정적인 send→wait→read 패턴
references/layout-window-tab.md창/탭 생성/닫기/크기 조정, 분할 창 탐색
references/layout-arrangement.md창 레이아웃 저장 및 복원
references/app-context.md스냅샷(방향 잡기), 상태, 컨텍스트 관리, 앱 변수, 모달 다이얼로그, 파일 패널
references/profile-pref.md프로필 목록/가져오기/프리셋, 환경설정 읽기/쓰기, tmux 환경설정 단축키
references/broadcast-menu.md여러 창에 키 입력 브로드캐스트, 메뉴 항목 호출
references/tmux-commands.md모든 tmux CLI 명령어 (부트스트랩, 전송, 탭, create-window, set-visible)
references/tmux-guide.md전체 tmux -CC 워크플로, 창→세션 ID 매핑
references/json-session.md세션, 창, 탭, 화면, 스크롤백, 주입에 대한 --json 스키마
references/json-tmux-app.mdtmux, 앱 다이얼로그, 환경설정, 오류에 대한 --json 스키마

REPL 모드

인수 없이 실행하면 명령어 간 컨텍스트를 유지하는 대화형 REPL이 실행됩니다:

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

>-

관련 스킬