Agent skill

CLI Anything Iterm2

by HKUDS in HKUDS/CLI-Anything

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…

Apache-2.0Auto-check passed

Install CLI Anything Iterm2

skills CLI
$ npx skills add HKUDS/CLI-Anything --skill cli-anything-iterm2 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/CLI-Anything cli-anything-iterm2 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/CLI-Anything.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cli-anything-iterm2 .claude/skills/cli-anything-iterm2 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cli-anything-iterm2
GitHub stars
52k
Token cost
~1.3k tokens
SKILL.md length
387 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

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…

  • Works in 3 steps: macOS + iTerm2 running: brew install… → Python API enabled: iTerm2 → Preferences… → Install: pip install cli-anything-iterm2…
  • SKILL.md covers Prerequisites, Basic Syntax, Command Groups and Orienting in an Existing…, plus 3 more sections
  • Calls pip and brew

What it does

CLI Anything Iterm2 is an agent skill from HKUDS/CLI-Anything. 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…

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with tmux, macOS and Python. The repository describes itself as: "CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/. The licence is Apache-2.0.

Example prompts

  • “Use the cli-anything-iterm2 skill to provide the cli-anything-iterm2 commands — the only way to actually send text to iTerm2 sessions, read live…”
  • “/cli-anything-iterm2”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  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)

What it can do on your machine

Read from SKILL.md and the folder at commit 34f5195. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CLI Anything Iterm2 loads about 1.3k tokens when it runs. Until then it costs about 230 tokens; SKILL.md has 387 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~230
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/CLI-Anything at commit 34f5195, republished under its Apache-2.0 licence (© HKUDS). 387 words, ~1,341 tokens.

Download SKILL.mdSave it as .claude/skills/cli-anything-iterm2/SKILL.md (or your agent's skills folder).
name
cli-anything-iterm2
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.

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

bash
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:

bash
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:

bash
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.

Show full SKILL.md (144 more words)Show less

Typical Agent Workflow

bash
# 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:

bash
cli-anything-iterm2

© HKUDS, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cli-anything-iterm2 of HKUDS/CLI-Anything.

Open the folder on GitHubat commit 34f5195

Compare with similar skills

CLI Anything Iterm2 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CLI Anything Iterm2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLI Anything Iterm2 this skillHKUDS/CLI-Anything52k—~1.3kAutomated safety check: PassApache-2.0
Disk Storage AnalyzerKKKKhazix/khazix-skills21k1 repos~1.4kAutomated safety check: PassMIT
Apple Container Test RunnerRustPython/RustPython22k—~467Automated safety check: PassMIT
JianYing Editor Automationluoluoluo22/jianying-editor-skill3.8k—~2.2kAutomated safety check: PassApache-2.0
Mobile Demo Film Editorsuperset-sh/superset15k—~1.8kAutomated safety check: PassCustom licence
Reproduce macOS Python FlavorsNuitka/Nuitka15k—~1.7kAutomated safety check: PassAGPL-3.0

Similar skills

  • Disk Storage Analyzer

    KKKKhazix/khazix-skills

    Scans a Mac or Windows PC read-only to find what fills the disk, grades each item by how safe it is to clean and builds an interactive HTML report.

    21k GitHub starsUsed in 1 repo~1.4k tokens
    Productivity & AutomationAuto-check passed
  • Apple Container Test Runner

    RustPython/RustPython

    Runs RustPython tests inside a Linux container built with Apple's container CLI, so macOS users can compare Linux results with their local ones.

    22k GitHub stars~467 tokensUpdated today
    Testing & QAAuto-check passed
  • JianYing Editor Automation

    luoluoluo22/jianying-editor-skill

    Automates JianYing Pro video editing through a Python wrapper, JyWrapper, covering drafts, media import, subtitles, screen recording, voiceover and export.

    3.8k GitHub stars~2.2k tokensUpdated 27 days ago
    Media & CreativeAuto-check passed
  • Mobile Demo Film Editor

    superset-sh/superset

    Edits real mobile screen recordings into a configurable demo video with phone framing, title cards, cutaways and an end card, using a bundled renderer.

    15k GitHub stars~1.8k tokensUpdated today
    Media & CreativeAuto-check passed
  • Reproduce macOS Nuitka issues across Python distributions and GitHub Actions Python packaging.

    15k GitHub stars~1.7k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • A skill your agent uses when you need to run interactive CLI tools (vim, git rebase -i, Python REPL, etc.) that require real-time input/output - provides tmux-based approach for controlling…

    430 GitHub starsUsed in 3 repos~1.3k tokens
    DevelopmentAuto-check passed

More from HKUDS/CLI-Anything

All 78 skills in this repo
  • CLI-Anything for Codex

    HKUDS/CLI-Anything

    Lets Codex build, refine, test, validate and list CLI-Anything harnesses for GUI applications or source repositories, following the project's full methodology.

    52k GitHub stars~1.5k tokensUpdated 16 days ago
    Auto-check passed
  • CLI-Anything for Reasonix

    HKUDS/CLI-Anything

    Adapts the CLI-Anything methodology so Reasonix can build, refine, test and validate a command-line harness for an existing GUI application or source repository.

    52k GitHub stars~1.8k tokensUpdated 16 days ago
    Auto-check passed
  • Guides Hermes Agent through building, refining and testing a CLI-Anything harness that wraps a GUI application or source repository in a scriptable command line.

    52k GitHub stars~1.1k tokensUpdated 16 days ago
    Auto-check passed
  • Builds, refines, tests or validates a CLI-Anything harness that wraps a GUI application or source repository as a stateful Click CLI with JSON output and a REPL mode.

    52k GitHub stars~839 tokensUpdated 16 days ago
    Auto-check passed
  • Krita CLI Harness

    HKUDS/CLI-Anything

    Drives Krita from the command line to create projects, add layers, apply filters, resize the canvas and export images, with JSON output for agents.

    52k GitHub stars~931 tokensUpdated 16 days ago
    Auto-check passed
  • MacroCLI GUI Macros

    HKUDS/CLI-Anything

    Defines, lists, inspects and runs parameterized GUI macros from the command line, with the runtime choosing the execution backend.

    52k GitHub stars~1.4k tokensUpdated 16 days ago
    Auto-check passed

Works with

Questions about CLI Anything Iterm2

What does CLI Anything Iterm2 do?

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…. CLI Anything Iterm2 is an agent skill from HKUDS/CLI-Anything. 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.

How do I install CLI Anything Iterm2 in Claude Code?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-iterm2 -a claude-code`. Or copy the skill folder (skills/cli-anything-iterm2 in HKUDS/CLI-Anything) into .claude/skills/cli-anything-iterm2 in your project. Claude Code loads it when a task matches its description.

How do I install CLI Anything Iterm2 in Codex?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-iterm2 -a codex`. Or copy the skill folder (skills/cli-anything-iterm2 in HKUDS/CLI-Anything) into .agents/skills/cli-anything-iterm2 in your project. Codex loads it when a task matches its description.

Can I use CLI Anything Iterm2 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/CLI-Anything --skill cli-anything-iterm2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cli-anything-iterm2, .gemini/skills/cli-anything-iterm2, .github/skills/cli-anything-iterm2 and .opencode/skills/cli-anything-iterm2 in your project.

What does CLI Anything Iterm2 need to run?

Going by SKILL.md and its folder, CLI Anything Iterm2 needs the command-line tools its instructions call (pip and brew). Our summary lists: Python 3.

Does CLI Anything Iterm2 access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is CLI Anything Iterm2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does CLI Anything Iterm2 use?

CLI Anything Iterm2 is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CLI Anything Iterm2 use?

About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CLI Anything Iterm2?

Skills that share tags, products or a category with CLI Anything Iterm2: Disk Storage Analyzer (KKKKhazix/khazix-skills, 21k stars), Apple Container Test Runner (RustPython/RustPython, 22k stars), JianYing Editor Automation (luoluoluo22/jianying-editor-skill, 3.8k stars) and Mobile Demo Film Editor (superset-sh/superset, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLI Anything Iterm2?

HKUDS (a GitHub organization) maintains it in HKUDS/CLI-Anything, which has 51,696 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on September 22, 2026.

Source: HKUDS/CLI-Anything on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.