Inside CLI-Anything: 69 GUI apps turned into agent-native CLIs, and 2,464 tests behind the claim

On November 23, 2026, HKUDS/CLI-Anything was third on GitHub Trending: 63,184 stars, 783 added that day. Its README carries badges for 18 apps and 2,461 passing tests; scroll to the test summary and the total reads 2,464. Pulling the 48 MB tarball and counting the 64 MB tree gives 69 directories with an agent-harness, 7 HARNESS.md files, 151 SKILL.md files, and 164 test_*.py files.

Documentation and code have stopped describing the same project. That is not a scandal, it is what happens when an agent project moves fast. It is also a useful way in.

What it rejects is pixel coordinates, not the GUI

The technical report, arXiv:2606.03854, submitted June 2, 2026 by Yuhao Yang, Tianyu Fan and Chao Huang, states the position bluntly. Mainstream computer use agents read screenshots, locate UI elements, compute coordinates, and click. That loop is misaligned with what agents are good at: pixel interactions are brittle, timing dependencies are hard to control, and a moved button invalidates the coordinate. Agents end up imitating human perceptual limits instead of using structured processing and programmatic control.

CLI-Anything proposes changing the interface instead: wrap existing software in a command-line harness with structured commands, explicit state and deterministic feedback, so the lossy visual-to-computational translation never happens. CLI-Hub is the distribution layer for that idea: pip install cli-anything-hub, then cli-hub install <name>.

It sounds like an old Unix argument dressed up for agents. Then you read the 36 KB HARNESS.md and realize it has very little to do with writing wrappers.

Seven phases, and phases three and five carry the weight

PhaseDeliverableWhat a machine can actually check
1 Codebase analysisBackend engine, action to API map, data model inventoryWhether native CLIs such as melt, ffmpeg or convert were found as building blocks
2 ArchitectureSubcommands plus stateful REPL, session model, --jsonSession serializes to JSON; command groups cover undo and redo
3 ImplementationReal backend module, session lock, ReplSkinshutil.which finds the real program, subprocess.run calls it, session JSON saved under an exclusive lock with r+ open and truncate inside the lock
4 Test planTEST.md written before test codeInventory precedes implementation; E2E scenarios say which output property is checked
5 TestsUnit, native E2E, real backend E2E, subprocess CLIMust call the real software; missing software fails rather than skips; check magic bytes, ZIP structure, pixels, RMS, allow plus or minus one frame at non-integer frame rates
6 DocumentationREADME and TEST.md filled inCommands aligned with measured output
6.5 Skill generationCanonical root SKILL.md plus packaged copyYAML frontmatter generated from Click decorators, setup.py and README
7 PublishPyPI package cli-anything-<software>Installed command lands on PATH so agents find it with which

Phase five contains the spine of the project: no graceful degradation, if the software is not installed the tests fail, not skip. Generating a CLI is not rare. What is rare is a rule that says exporting a PDF only counts when the file header reads %PDF-, that a rendered video needs frame sampling and brightness comparison, and that an exit code of zero proves nothing.

Counting the repository

import os

root = "CLI-Anything-main"
apps = []
for name in os.listdir(root):
    if os.path.isdir(os.path.join(root, name, "agent-harness")):
        apps.append(name)

harness_docs = 0
skills = 0
tests = 0
for dirpath, dirnames, filenames in os.walk(root):
    for filename in filenames:
        if filename == "HARNESS.md":
            harness_docs += 1
        if filename == "SKILL.md":
            skills += 1
        if filename.startswith("test_") and filename.endswith(".py"):
            tests += 1

readme = open(os.path.join(root, "README.md"), encoding="utf-8").read()
badge = "Tests-2%2C461_Passing" in readme
summary = "TOTAL        2,464 passed" in readme

print("apps with agent-harness:", len(apps))
print("HARNESS.md files:", harness_docs)
print("SKILL.md files:", skills)
print("test_*.py files:", tests)
print("README badge says 2,461:", badge)
print("README summary says 2,464:", summary)
apps with agent-harness: 69
HARNESS.md files: 7
SKILL.md files: 151
test_*.py files: 164
README badge says 2,461: True
README summary says 2,464: True

Sixty-nine against eighteen: the badge counts apps with full demos, not harnesses. One hundred fifty-one SKILL.md files against 69 apps: phase 6.5 writes both a canonical root file and a packaged compatibility copy, plus some independently registered CLIs. One hundred sixty-four test files against 2,464 passing tests: files versus cases, not a contradiction.

The numbers worth pausing on are the three different test totals, and the limitations the README states itself. Reliable generation needs frontier-class models such as Claude Opus 4.6, Sonnet 4.6 or GPT-5.4. The target software needs readable source, since binary-only targets degrade coverage. One /cli-anything run is often not enough; /refine is expected. The license is Apache 2.0, but the safety work arrived as individual patches: a GIMP Script-Fu path injection fix on March 14, a switch to defusedxml for XML, SVG and ODF inputs on May 19, and path traversal plus symlink hardening for Sketch token files on May 21. Those are not decoration. They are what happens when files become agent-controlled input.

A minimal harness, in sixty lines

Real harnesses use Click, prompt_toolkit and actual backends. The protocol layer is small: probe first, then mutate, persist state as JSON, emit machine-readable output, read the artifact back. This version uses only the standard library:

import argparse
import json
import os


def load_state(path):
    if os.path.exists(path):
        with open(path, encoding="utf-8") as handle:
            return json.load(handle)
    return {"version": 1, "values": {}}


def save_state(path, state):
    with open(path, "w", encoding="utf-8") as handle:
        json.dump(state, handle, sort_keys=True)
        handle.write(chr(10))


def main():
    parser = argparse.ArgumentParser()
    commands = parser.add_subparsers(dest="cmd", required=True)
    probe = commands.add_parser("probe")
    probe.add_argument("--state", required=True)
    set_cmd = commands.add_parser("set")
    set_cmd.add_argument("--state", required=True)
    set_cmd.add_argument("--key", required=True)
    set_cmd.add_argument("--value", required=True)
    export = commands.add_parser("export")
    export.add_argument("--state", required=True)
    export.add_argument("--out", required=True)
    args = parser.parse_args()

    state = load_state(args.state)
    if args.cmd == "probe":
        result = {"ok": True, "commands": ["probe", "set", "export"],
                  "state_exists": os.path.exists(args.state),
                  "keys": sorted(state["values"].keys())}
    elif args.cmd == "set":
        state["values"][args.key] = args.value
        save_state(args.state, state)
        result = {"ok": True, "set": args.key,
                  "keys": sorted(state["values"].keys())}
    else:
        payload = json.dumps(state, sort_keys=True).encode("utf-8")
        with open(args.out, "wb") as handle:
            handle.write(payload)
        with open(args.out, "rb") as handle:
            head = handle.read(1)
        result = {"ok": head == b"{", "bytes": len(payload),
                  "out": args.out.rsplit(os.sep, 1)[-1]}
    print(json.dumps(result, sort_keys=True))


main()
python mini_harness.py probe --state state.json
{"commands": ["probe", "set", "export"], "keys": [], "ok": true, "state_exists": false}
python mini_harness.py set --state state.json --key model --value qwen3.6-35b
{"keys": ["model"], "ok": true, "set": "model"}
python mini_harness.py export --state state.json --out artifact.json
{"bytes": 50, "ok": true, "out": "artifact.json"}

Note the last command. It does not trust open(..., "wb") for not raising. It reads the file back and checks the first byte. That is phase five in miniature. To wire this into an agent, add a fixed --json output mode, put state writes under an exclusive lock, and pair every mutation with an undo command. The skeleton is enough.

The moat here is not generating a CLI, which any stronger model can copy. It is that unglamorous phase-five rule: a failed export must fail the run, a missing backend must fail the run, and exit code zero is not evidence. Models will change three times. That rule will still need someone to write it down.

Further reading

フィードバック

このサイトはフロントエンドのみでバックエンドやアカウントはなく、フィードバックはGitHub Issues・ディスカッション・メールで受け付けています。

issueやメールに貼り付けていただくと問題特定が早まります。入力内容は含まれません

その他:既存の報告を見る · メールでのフィードバック(GitHubアカウント不要):278975598@qq.com