CLI-Anything: Making All Software Agent-Native
CLI-Anything: Making All Software Agent-Native
CLI-Anything (35k+ stars) is an open-source framework from HKUDS that generates a complete, structured CLI harness for any software target, enabling AI coding agents to control applications like GIMP, Blender, LibreOffice, Obsidian, and 40+ others through deterministic command-line interfaces.
Built on the thesis that tomorrow’s users will be agents: today’s software serves humans via GUIs, but AI agents need structured, composable, self-describing interfaces. CLI-Anything builds that bridge.
Why This Exists
AI agents like Claude Code, Pi, and Codex operate through text commands, but most applications expose GUIs and not CLIs. Without a structured interface, agents resort to fragile hacks like simulating keystrokes or parsing pixel output.
The CLI format solves this: structured JSON output eliminates parsing complexity, --help flags provide auto-discoverable documentation, and commands compose into deterministic multi-step workflows. CLI-Anything generates all of this automatically from a software’s source code, API surface, or executable.
Key Features
🎯 One Command, Full Pipeline
Run a single /cli-anything command and get a complete, tested CLI harness:
/cli-anything ./gimpThis runs a 7-phase pipeline:
- Analyze: Scans source code, maps GUI actions to APIs
- Design: Architects command groups, state model, output formats
- Implement: Builds Click CLI with REPL, JSON output, undo/redo
- Plan Tests: Creates TEST.md with unit + E2E test plans
- Write Tests: Implements comprehensive test suite
- Document: Updates TEST.md with results
- Publish: Creates
setup.py, installs to PATH
🔄 Iterative Refinement
After the initial build, run /cli-anything:refine <path> [focus] to expand coverage. Each run performs gap analysis and implements new commands, tests, and documentation incrementally and non-destructively.
📦 CLI-Hub Package Manager
CLI-Hub is a central registry for browsing, installing, and managing community-built CLIs:
pip install cli-anything-hub
cli-hub install <name>The hub supports multiple install sources (pip, npm, brew, bundled/system tools) and a public_registry.json that constantly expands.
🧩 40+ Application Harnesses
CLI-Anything ships with production-grade harnesses for a wide range of software:
| Category | Applications |
|---|---|
| Creative | GIMP, Blender, Krita, Inkscape, Audacity, Shotcut, Kdenlive, MuseScore, Openscreen |
| Office | LibreOffice, Obsidian, Zotero, Draw.io, Mubu |
| Dev Tools | n8n, Dify Workflow, Exa, WireMock, ChromaDB, PM2, CloudAnalyzer |
| Design | FreeCAD, QGIS, Sketch, Godot, RenderDoc |
| Browser | Safari, Browser CLI, iTerm2 |
| AI / ML | ComfyUI, Ollama, Novita, UniMol Tools, SeaClip |
| Video | VideoCaptioner, OBS Studio |
| Other | Zoom, Firefly III, AdGuard Home, IntelWatch, Slay the Spire II, Eth2-Quickstart |
🤖 8 Supported Agent Platforms
CLI-Anything integrates with virtually every major AI coding agent:
| Platform | Integration Method |
|---|---|
| Claude Code | /plugin marketplace add HKUDS/CLI-Anything |
| Pi Coding Agent | .pi-extension install script |
| OpenCode | Copy commands to ~/.config/opencode/commands/ |
| Codex | Skill installer script |
| OpenClaw | SKILL.md copy to skills directory |
| Qodercli | Plugin registration script |
| GitHub Copilot CLI | copilot plugin install |
| Goose | Uses Claude Code provider commands |
📋 Structured Output
Every CLI command outputs structured JSON by default, making it trivial for agents to parse, chain, and compose into complex workflows. Human-readable output is also available for debugging.
🔒 Security Hardening
Includes built-in protection against injection attacks (e.g., GIMP Script-Fu path injection fix), with ongoing security reviews as part of the contribution pipeline.
Quick Start
Claude Code (most popular)
# Add the marketplace
/plugin marketplace add HKUDS/CLI-Anything
# Install the plugin
/plugin install cli-anything
# Generate a CLI for any software
/cli-anything ./gimpPi Coding Agent
git clone https://github.com/HKUDS/CLI-Anything.git
cd CLI-Anything
bash .pi-extension/cli-anything/install.shThen /cli-anything ./blender.
OpenCode
cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/commands/
cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/commands/Then /cli-anything ./libreoffice.
Codex
bash CLI-Anything/codex-skill/scripts/install.shThen “Use CLI-Anything to build a harness for ./gimp”.
Architecture
The generated harness follows a consistent structure:
<software>/agent-harness/ ├── cli/ # Click CLI implementation ├── test/ # Unit + E2E tests ├── cli.py # Main entry point ├── TEST.md # Test plan and results ├── SKILL.md # AI-discoverable skill definition ├── REPL.py # Interactive REPL mode └── setup.py # Package installer
Each generated CLI has:
- Click-based CLI with command groups matching the software’s capabilities
- REPL mode for interactive agent sessions
- JSON output for deterministic agent parsing
- Undo/redo for safe multi-step workflows
- 100+ unit tests with comprehensive coverage
Why This Tool Rocks
- One Command: Generate a complete, tested CLI for any software in minutes
- 35k+ Stars: One of the fastest-growing open-source AI infrastructure projects
- 40+ Harnesses: Production-grade CLIs for creative, office, dev, and AI tools
- 8 Platforms: Works with Claude Code, Pi, OpenCode, Codex, OpenClaw, Copilot, Qodercli, Goose
- Iterative Refinement: Expand coverage incrementally without breaking existing commands
- Structured Output: JSON by default, human-readable on demand
- CLI-Hub Registry: Central package manager for browsing and installing CLIs
- Community Driven: 634+ commits, 3.4k forks, active daily development from HKUDS and contributors
- Open Source: Apache-2.0 license, security-hardened, actively maintained
🔗 GitHub: github.com/HKUDS/CLI-Anything
🔗 CLI-Hub: hkuds.github.io/CLI-Anything
Crepi il lupo! 🐺