CLI-Anything: 7-Stage Pipeline Lets AI Agents Drive Professional Software via CLI
HKU's CLI-Anything automates a 7-stage pipeline to generate installable, tested CLIs for any software, enabling AI Agents to directly control professional tools like FreeCAD and Blender via real backends instead of fragile UI automation, with 2,280+ tests passed across 17 software categories.
Reading font

CLI-Anything is an open-source tool from the Hong Kong University Data Science Lab (HKUDS) that automatically generates command-line interfaces (CLIs) for arbitrary software, making them natively usable by AI Agents. The project has gained 62k+ GitHub stars in 262 days and is licensed under Apache-2.0, implemented in Python 3.10+.
Core Approach: Direct Backend Integration
Unlike UI automation (brittle, breaks on interface changes) or stripped-down reimplementations (lose 90% functionality), CLI-Anything connects directly to the software's real backend. For example, LibreOffice actually generates PDFs, Blender renders 3D scenes, and Audacity processes audio. The project reports 2,280+ tests all running against real software binaries, not mocks. FreeCAD's generated CLI exposes 258 commands across 17 groups, covering sketching to mesh export. The trade-off: the target software must be installed locally; missing backends cause test failures rather than being skipped.
7-Stage Automated Pipeline
The pipeline encodes the entire SOP of CLI creation into seven automated stages:
Codebase analysis
CLI design
Implementation
Test planning
Test implementation
Test documentation
PyPI publishing
An intermediate step generates a SKILL.md file extracted from Click decorators and setup.py metadata. Feeding a software source path to /cli-anything runs all stages and outputs a pip install -able package. Generated CLIs include unified naming, a REPL, and undo/redo session management. However, a single run rarely achieves full coverage; the authors acknowledge that /refine often needs multiple iterations (e.g., a 200-feature software may only get 70% coverage initially).
Community Distribution via CLI-Hub
Each generated CLI carries a SKILL.md discoverable by npx skills and loadable directly by agents like Claude Code, Cursor, Pi, OpenClaw, and Codex. The cli-anything-hub package ( pip install cli-anything-hub) provides a store-like experience: cli-hub search <keyword> and cli-hub install <name>. The hub currently covers 17 major categories (creative media, scientific computing, games, office, communication, charting, data analysis, etc.) with dozens of community-contributed CLIs. Quality varies; users are advised to inspect source before use.
Limitations and Costs
Strong model dependency: Generation requires frontier models — specifically Claude Opus 4.6, Sonnet 4.6, or GPT-5.4 tier. Weaker models produce incomplete or incorrect CLIs requiring heavy manual fixes.
Source code required: The pipeline starts from source analysis. Closed-source binaries need decompilation, reducing harness quality and coverage. Packaging for closed-source or pure web services remains on the roadmap.
Iterative refinement: Multiple /refine rounds are typical, each consuming significant tokens on expensive models, making high-quality CLI generation non-trivial in cost.
Audience mismatch: If you only need an existing CLI, use CLI-Hub directly. The pipeline targets teams integrating internal or niche software into Agent workflows.
Installation and Usage
Prerequisites
Python 3.10+. For generation: Claude Code (or Cursor, Pi, OpenClaw) with access to a strong model. For consuming existing CLIs: only a Python environment.
Path 1: Use Existing CLI (Quick)
pip install cli-anything-hubcli-hub search <keyword>to find target software cli-hub install <name> and use immediately
Path 2: Generate New CLI
Install the plugin into Claude Code's plugins directory, reload, then run /cli-anything <software source path or repo URL>. The pipeline executes all seven stages; run /refine to improve coverage.
Verification and Known Pitfall
Test with GIMP: /cli-anything gimp should sequentially output the seven stages and produce an installable cli-anything-gimp package. Windows users may encounter cygpath: command not found due to path conversion scripts; fix by installing Git Bash's cygpath or running inside WSL.
Time investment: installing a ready-made CLI takes ~10 minutes; generating a new one ranges from a couple of hours to an afternoon of iterative refinement depending on model and software complexity.
Author's Perspective
The fundamental insight: AI Agents lack not intelligence but reliable "hands" to operate software. CLI is the universal text-based interface that both humans and LLMs share — --help serves as built-in documentation, JSON output avoids parsing pain, and Claude Code's daily thousands of real workflows prove the model. Compared to fragile UI automation and incomplete reimplementations, direct backend integration is the correct path.
Recommended for: teams building Agent toolchains or needing to connect internal/niche software to Agents. Casual developers should start with CLI-Hub's ready-made CLIs (e.g., Blender, FreeCAD) and only dive into the pipeline when a genuine integration need arises.
GitHub repository: https://github.com/HKUDS/CLI-Anything
For questions about attribution, corrections or content rights, please contactand we will review it promptly.