HKUDS/CLI-Anything
"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
CLI‑Anything — Turning Any Application into an Agent‑Ready Command‑Line Tool
What it is
- A Python‑based framework that lets you wrap existing desktop or server software with a Click‑powered CLI whose commands output structured JSON. The generated CLIs are designed to be discoverable and usable by AI agents (Claude Code, Cursor, OpenClaw, etc.) as well as human users.
Why it matters
- Modern AI agents excel when they can issue deterministic, composable commands. A well‑defined CLI satisfies that need: it is text‑based, self‑documenting (
--help), and can be called from any shell the agent runs in. - By automatically generating a CLI for any target program, CLI‑Anything removes the manual engineering work that would otherwise be required to expose that program to an agent.
How it works (the 7‑phase harness generator)
- Analyze – The tool scans the target software (source code, API docs, or UI recordings) to infer actions the program can perform.
- Design – It groups those actions into logical command groups, defines a state model, and decides on a JSON schema for output.
- Implement – A full Click‑based command‑line interface is emitted, complete with a REPL mode, undo/redo support, and JSON‑only output.
- Plan Tests – A
TEST.mdskeleton is created, outlining unit‑ and end‑to‑end (E2E) test cases. - Write Tests – The framework auto‑generates the test code and runs it, achieving the high coverage reported in the README (≈2 500 passing tests).
- Document – Test results are inserted back into
TEST.md, giving a living specification. - Publish – A
setup.py/pyproject.tomlis produced, the CLI is packaged, and it can be installed globally or via the CLI‑Hub package manager.
CLI‑Hub – the one‑stop registry
- Install with
pip install cli-anything-hub. - Commands such as
cli-hub list,search,install,launchlet you browse a growing catalog of pre‑built CLIs (e.g., GIMP, Blender, Zoom, Obsidian, FreeCAD, Unreal Engine, etc.). - The hub also publishes a meta‑skill (
cli-hub-meta-skill) that agents can load, enabling them to discover and install the right CLI on‑the‑fly.
Typical workflow for a developer
- Pick a target – any executable or codebase you want an agent to control.
- Run the generator – e.g.
cli-anything ./path/to/gimp(or via a Claude Code plugin). The framework produces a ready‑to‑install Python package. - Test & refine – The generated test suite runs automatically; you can add more commands or tweak the JSON schema.
- Publish – Push the package to PyPI or keep it internal; the CLI‑Hub can then list it for other users.
Who can use it
- AI‑first teams building agents that need to interact with existing software.
- Developers who want a quick, reproducible CLI wrapper around a tool without writing Click code by hand.
- Researchers exploring agent‑driven automation, RAG pipelines, or multi‑tool workflows.
Key technical details (from the README)
- Python ≥ 3.10, built on Click ≥ 8.0.
- Outputs are JSON + human‑readable messages to keep agents’ parsing simple.
- Test suite uses pytest with 100 % pass rate; both unit and E2E tests are included.
- Security‑focused: token‑file handling, path‑traversal guards, and
defusedxmlfor XML parsing. - Community‑driven: new CLIs are added via PRs, and the hub updates instantly.
Where to start
- Install the hub:
pip install cli-anything-hub. - Browse available CLIs:
cli-hub list. - Install one (e.g., GIMP):
cli-hub install gimp && cli-hub launch gimp. - To create a new CLI, run the generator on your software and follow the on‑screen prompts.
Bottom line CLI‑Anything provides the missing bridge between any software and any AI agent by turning GUI‑heavy applications into clean, JSON‑emitting command‑line interfaces, all backed by an automated generation pipeline and a shared registry.
Related
- Project
- Project
- Project
- Project
- Project