CLI-Anything - A native tool for converting HKU open-source code into AI agents
CLI-Anything is an open-source tool from the Data Science Laboratory (HKUDS) at the University of Hong Kong that can convert the codebase of any open-source software into a command-line interface (CLI) usable by AI Agents with a single click.
What is CLI-Anything?
CLI-Anything is an open-source tool from the Data Science Lab (HKUDS) at the University of Hong Kong. It can transform the codebase of any open-source software into a command-line interface (CLI) usable by AI Agents with a single click. Through a 7-stage automated process (analysis, design, implementation, testing, etc.), the tool allows professional software such as GIMP, Blender, and LibreOffice to move beyond fragile GUI automation and become stable, structured, and programmable native Agent tools, realizing the vision of "Today's software is for people, tomorrow's users are agents."
CLI-Anything's main functions
-
One-click CLI generationIt can automatically complete the entire 7-stage process from source code analysis to release with a single command, turning any open source software into a command-line tool usable by the Agent.
-
Real Software Integration: Directly manipulate existing professional software (such as GIMP, Blender, LibreOffice) to call real applications to process project files.
-
Say Goodbye to GUI AutomationIt abandons the fragile solutions of screenshot recognition and simulated clicks, and adopts pure command-line interaction to eliminate the risk of failure caused by changes in UI elements.
-
Structured outputSupports both REPL interactive mode and script subcommand dual mode, with built-in...
--jsonThe flag outputs structured data, making it easy for the Agent to directly consume and parse it. -
Production-level testing assuranceThe system was validated with 1,436 test cases across 9 professional software applications, including unit testing, end-to-end testing, and real software calls, ensuring a 100% pass rate.
The technical principles of CLI-Anything
- Static source code analysis and GUI mappingBy scanning the source code of the target software, the system identifies the operation logic, event handling, and API calls in the graphical interface, mapping human GUI operations such as clicking and dragging into programmable function interfaces.
- Architecture Design and State ModelingBased on the analysis results, design the command group structure, construct the runtime context of the state model management software (such as the current project, selected object, and editing history), and define a unified input and output format specification.
- CLI framework automatically generatedUsing code generation technology, it automatically builds command-line interfaces based on Python CLI frameworks such as Click, including agent-friendly features such as REPL interactive environment, JSON serialization output, and undo/redo mechanism.
- Real software call encapsulationThe generated CLI does not reimplement functionality; it directly drives the real application by calling the software's native API, script interface, or headless mode, ensuring functional integrity and compatibility.
- Test-driven verificationIt supports the automatic generation and execution of unit tests and end-to-end tests, verifying the consistency of the generated CLI with the behavior of various versions of the target software, and ensuring the reliability of the production environment.
CLI-Anything project address
- GitHub repositoryhttps://github.com/HKUDS/CLI-Anything
Application scenarios of CLI-Anything
- Multimedia content creationThis allows the AI Agent to directly call Blender for 3D modeling and rendering, use GIMP to process images, and edit audio through Audacity, thus achieving an automated content production pipeline.
- Document automation processingIt drives LibreOffice to generate reports in batches, convert formats, and populate data, replacing traditional template engines to intelligently generate complex document layouts.
- Video post-productionIt controls professional tools such as OBS, Kdenlive, and Shotcut to achieve automatic editing, special effects addition, multi-track compositing, and batch export, greatly improving video production efficiency.
- Design workflow integrationIntegrate design software such as Inkscape and Krita into the Agent system to automate vector graphics generation, batch material processing, and brand visual guidelines execution.
- Scientific and Engineering ComputingExtending to the fields of CAD, EDA, and scientific computing tools, it allows Agents to directly operate professional software to complete complex tasks such as simulation analysis, circuit design, and data visualization.