Build, install, refine, and use agent-native CLI harnesses for any GUI software. CLI-Anything transforms applications (Blender, GIMP, LibreOffice, Shotcut, etc.) into stateful CLIs optimized for AI agent interaction. Use whenever the user wants to: create a CLI for a GUI app, install a CLI-Anything harness, find available agent-native CLIs in the hub, refine or test an existing harness, or automate professional software via command line. Also triggers on: "make a CLI for", "agent-native CLI", "cli-anything", "CLI harness", "turn this app into a CLI", "install cli-anything-gimp", "what CLIs are available", or any request to operate GUI software programmatically without a display.
An agent-native framework that transforms GUI software into stateful command-line interfaces optimized for AI agent interaction. Instead of screenshot-based UI automation, CLI-Anything wraps real software backends into structured CLIs with JSON output, REPL mode, undo/redo, and session persistence.
Before running pip install from a URL the user provides (not the CLI-Anything hub),
confirm with the user: "This will install a Python package from [URL]. Proceed?"
Do not auto-install from untrusted sources. The pre-built CLIs from
github.com/HKUDS/CLI-Anything are trusted and can be installed without confirmation.
Mode selection: When the user requests a CLI for specific software:
Pre-built CLIs are available in the hub. Always check the live catalog first — it's auto-updated and may have CLIs not listed below:
# Fetch the live catalog to see what's available
curl -s https://hkuds.github.io/CLI-Anything/SKILL.txt | head -100
# Install a specific CLI
pip install "git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=<software>/agent-harness"
# Example: install GIMP CLI
pip install "git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=gimp/agent-harness"
# Verify
cli-anything-gimp --help
Available CLIs by category:
| Category | CLIs |
|---|---|
| Creative | gimp, blender, inkscape, krita, audacity, kdenlive, shotcut, renderdoc |
| Productivity | libreoffice, mubu, iterm2 |
| AI/ML | ollama, comfyui, notebooklm, anygen, novita |
| Diagramming | drawio, mermaid |
| Communication | zoom, obs-studio |
| Development | browser, freecad, musescore, sketch |
| Infrastructure | adguardhome |
When the user wants to create a CLI for software not in the hub:
Input: A local source path (./gimp) or GitHub URL pointing to the software's
source code or documentation.
Before starting: Verify the path/URL exists and is accessible. Check the hub catalog to see if a CLI already exists — if so, ask the user whether to install the existing one or build a custom harness.
7-Phase Pipeline:
--json flag, session stateDecision gates:
--help works before proceeding.If any phase fails, diagnose the issue and retry that phase before proceeding.
Output structure:
<software>/
└── agent-harness/
├── <SOFTWARE>.md # Architecture doc
├── setup.py # pip-installable
└── cli_anything/
└── <software>/
├── README.md
├── __init__.py
├── __main__.py
├── <software>_cli.py # Main CLI (Click)
├── core/ # Business logic
├── utils/
│ ├── repl_skin.py # REPL interface (copy from plugin)
│ └── <software>_backend.py # Real software wrapper
├── skills/
│ └── SKILL.md # AI-discoverable skill
└── tests/
├── TEST.md # Test plan
├── test_core.py # Unit tests
└── test_full_e2e.py # E2E tests
When the harness already exists:
All CLI-Anything CLIs follow the same patterns:
# One-shot subcommand mode
cli-anything-<software> --json <command> [options]
# Interactive REPL mode (default when no subcommand)
cli-anything-<software>
> help
> project new -o myproject.json
> undo
> exit
# Common patterns
cli-anything-<software> --help # See all commands
cli-anything-<software> --json status # Machine-readable status
Key features of every CLI:
--json flag for machine-readable outputPrefer the real software backend over reimplementation — re-implementing
software logic is error-prone and produces a CLI that diverges from the real
tool's behavior. Create
utils/<software>_backend.py that wraps the actual executable:
import shutil, subprocess
def find_software():
path = shutil.which("software-name")
if not path:
raise RuntimeError("software-name not found. Install: brew install software-name")
return path
def render(project_path, output_path):
exe = find_software()
subprocess.run([exe, "--headless", project_path, "-o", output_path], check=True)
find_namespace_packages(include=["cli_anything.*"])cli_anything/ as a namespace package (no top-level __init__.py)cli-anything-<software>=cli_anything.<software>.<software>_cli:mainCopy repl_skin.py from the CLI-Anything repository (cli-anything-plugin/repl_skin.py)
into utils/. It provides:
help(), success(), error(), warning(), info(), status(), table(), progress()print_goodbye() for clean exitTEST.md plan before writing test code — this prevents test scope
from drifting and documents what the tests should covertest_core.py — test core functions in isolationtest_full_e2e.py — invoke real software, verify output filessubprocess.run()pip install "git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=gimp/agent-harness"
cli-anything-gimp --json project new -o scene.json
cli-anything-gimp --project scene.json layer add-from-file photo.jpg
cli-anything-gimp --project scene.json filter add blur --layer 0 --params "radius=5"
cli-anything-gimp --project scene.json export render output.png --overwrite
pip install "git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=blender/agent-harness"
cli-anything-blender --json scene new -o scene.json
cli-anything-blender --project scene.json object add cube --name "Box"
cli-anything-blender --project scene.json material create --name "Red" --color 1,0,0,1
cli-anything-blender --project scene.json render execute output.png --overwrite
# Clone or point to software source
git clone https://github.com/example/my-software.git
# Use CLI-Anything methodology to build harness
# (Follow the 7-phase pipeline above)
cd my-software/agent-harness
pip install -e .
cli-anything-my-software --help
| Issue | Fix |
|---|---|
| CLI not found after install | Check PATH, try python -m cli_anything.<software> |
| Backend software missing | Install the real software (e.g., brew install gimp) |
| Import errors | Ensure cli_anything/ has no top-level __init__.py |
| REPL crashes | Update prompt-toolkit: pip install --upgrade prompt-toolkit |
| Tests fail on CI | Backend software may not be available — tests require real installations |