CLI-Anything generates agent-callable command-line interfaces for software
HKUDS’s CLI-Anything generates command-line interfaces for software, allowing agents to operate software through commands rather than screenshot-based clicking. Existing CLIs can be installed through cli-anything-hub, and new ones can be generated in tools such as Claude Code through a seven-step process. Examples include FreeCAD, Blender, and GIMP. The FreeCAD CLI has 258 commands in 17 groups, and repository badges show that it passed 22,461 tests.
Through multiple software examples, the article explains how CLI-Anything converts interface operations into agent-callable commands and demonstrates the specific process for generating a CLI.
最近翻 GitHub Trending 翻到个挺对胃口的项目,HKUDS 的 CLI-Anything,5.9 万星。
出发点很简单:现在的软件全是给人做的,界面、按钮、鼠标。Agent 想用,只能截图再点鼠标,又慢又容易点歪。CLI-Anything 反过来,给每个软件生成一个命令行,让 Agent 直接敲命令干活。
用起来分两条路。现成的直接装:pip install cli-anything-hub,cli-hub list 看一眼,cli-hub install gimp 就装上了。仓库里已经攒了一堆,Blender、FreeCAD、GIMP、QGIS、Obsidian、Zotero 这些都有。
没有就自己造。Claude Code 里装个插件,一句 /cli-anything ./gimp,七步流水线自己跑:先扫源码,把界面操作对应到 API,再设计命令分组,生成带 REPL 和 JSON 输出的 CLI,写测试,最后装到 PATH 里。Pi、OpenCode、Codex 这些也都支持。
演示里拿生成的 CLI 干的活还挺实在:FreeCAD 搭了个好奇号火星车,Blender 做了轨道中继无人机,Draw.io 画了张 HTTPS 握手图,顺手自动打了一把 Slay the Spire II,给视频加了字幕。FreeCAD 那个 CLI 有 258 条命令、17 组,仓库徽章写着 22,461 个测试通过。
要我说,这方向抓得准。现在缺的不是更聪明的模型,是能直接上手干活的手。截图点鼠标那套,看着热闹,跑起来全是脆弱的边角。给软件配个 CLI,操作就从猜坐标变成调接口,稳得多。
不过话说回来,258 条命令的 CLI,Agent 记得住,换我翻 --help 都得翻半天。
Source: 发量不多程序猿 · x.com