Skip to content

CLI-Anything: Turn ANY App into a CLI for Claude Code & Codex (GIMP, Blender, LibreOffice & More!)

Read the Portuguese translation →

Author: AICodeKing · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: CLI-Anything: Turn ANY App into a CLI for Claude Code & Codex (GIMP, Blender, LibreOffice & More!) · Channel: AICodeKing · 10:49 · Watch on YouTube

Topics: AI agents, Task and workflow automation, Claude Code, Software engineering with AI, AI developer tools

The video introduces CLI-Anything, an open-source project from HKUDS that generates command-line interfaces for existing software so AI agents can use applications through text commands and JSON output. It demonstrates installing existing tools from CLI Hub, letting an agent discover and use one, and generating a new CLI from an app’s source code through a seven-phase pipeline. The resulting CLIs call the real applications and include features such as tests, documentation, REPL mode, and undo and redo. The presenter also covers refinement, validation, test practices, and limitations, including the need for a strong model and the importance of checking generated code.

  • CLI-Anything generates an agent-friendly CLI for software, rather than replacing the application with a simplified copy.
  • Commands support JSON output, which helps agents interpret results reliably.
  • CLI Hub is a package manager for existing CLIs, including tools for graphics, audio, office work, and more.
  • A CLI Hub meta skill can teach supported agents to find and install tools for a task.
  • The generator analyzes an app’s source, designs and implements a CLI, writes tests and documentation, and publishes the result.
  • Generated CLIs use the real software and can include REPL mode, JSON output, and undo and redo.
  • The refine, test, and validate commands help improve coverage and check generated CLIs against project rules.
  • The project emphasizes testing real outputs, not merely relying on a successful exit code.
  • Reliable generation requires a strong model, works best with source code, can consume many tokens, and may need repeated refinement.
  • The presenter recommends reviewing generated commands and tests before granting access to important files.
Start Chapter Summary
00:03 What CLI-Anything does The presenter explains why text-based CLIs can work better for agents than GUI automation, limited APIs, or simplified rewrites.
02:15 Using CLI Hub The video shows how to install, search, and launch existing CLIs, then demonstrates an agent finding and using a tool.
04:22 Generating a CLI The presenter walks through the generator setup and its seven phases, from analyzing source code to publishing the CLI.
06:02 Examples, refinement, and testing Examples with generated project, LibreOffice, and Blender CLIs lead into refinement, validation, and the project’s testing approach.
08:41 Demos, limitations, and verdict The presenter describes additional demos, discusses model and source-code requirements, and gives a positive but cautious recommendation.

A CLI is text in and text out. — 01:10

So you get the full power of the app, not a toy version of it. — 01:43

an exit code of zero does not prove that an export worked. — 08:10

A CLI with JSON output is fast, cheap, and easy for an agent to use. — 09:46

CLI Anything, HKUDS, CLI hub, CLI generator, Claude Code, Codex, Blender, LibreOffice, draw.io, Apache License 2.0

00:03 Hi. Welcome to another video. So today I want to talk about a project called CLI anything. It comes from HKUDS, the data intelligence lab at the University of Hong Kong. This is the same lab that made Light RAG and a few other popular agent projects. The idea is simple. People make most software for humans. It has buttons, menus, and windows. AI agents are not good at those. They are good at text. So CLI anything takes a piece of software and gives it a command line interface that an agent can use. And it does this with one command. You

00:36 give it the source code of an app like or Blender. Then your coding agent reads the code and builds a full CLI for it. It also writes tests, docs, and a skill file for the agent. The repo has more than 54,000 stars now. It is Apache 2.0 licensed and it is fully open source. So this is quite a big project. Now, let’s talk about why a CLI is the right interface here. At the moment, there are three common ways to let an agent use a desktop app. The first is GUI automation. The agent takes screenshots and clicks on pixels. This is slow and it breaks when the UI changes.

01:10 The second is an API, but many apps do not have one or the API covers only a small part of the app. The third is a rewrite. Someone builds a small copy of the app in Python, but that copy misses most of the features. A CLI fixes these problems. Agents already know how to use a terminal. A CLI is text in and text out. Each command has a help page so the agent can discover what it can do. And here every command also has a dash-dash JSON flag. With that flag, the output is clean JSON that the agent can read without guessing. The other important point is that CLI anything does not replace the

01:43 real software. It calls it. For example, the LibreOffice CLI makes a real PDF through LibreOffice in headless mode. The Blender CLI renders with real Blender. The project calls this authentic software integration. So you get the full power of the app, not a toy version of it. Now, there are two ways to use this project. The first way is to use CLIs that other people already made. The second way is to build a new CLI for your own software. Let me show you both. Let’s start with the first way, which is CLI hub.

02:15 CLI hub is a package manager for these CLIs. To install it, open your terminal and run pip install cli-anything-hub. You need Python 3.10 or or newer. When the install finishes, run cli-hub-list. This shows you every CLI in the registry. There are a lot of them. You can see Blender, Inkscape, Audacity, OBS Studio, LibreOffice, Kdenlive, Shotcut, draw.io, Zoom, Ollama, ComfyUI, FreeCAD, QGIS, Obsidian, Zotero, and many more. If you want something specific, run cli-hub-search and then type a keyword.

02:45 For example, cli-hub-search-image. Now, you only see the image tools. To install one, run cli-hub-install-gimp. Then, run cli-hub-info-gimp to see the details. And to start it, run cli-hub-launch-gimp. One thing to note here, these CLIs call the real app. So, if you install the CLI, you also need on your machine. The same is true for Blender, LibreOffice, and the others. Now, let’s give this to an agent. The project has a meta skill for CLI hub. A meta skill is a skill that teaches the agent how to

03:16 find and install other tools. To add it, run npx-skills-add-hkuds/cli-anything. Then {dash} {dash} skill cli-hub-meta-skill, then {dash} g, and then {dash} y. The {dash} g flag makes it a global install. The {dash} y flag skips the questions. This works with Claude Code, Codex, Open Claw, Nanobot, Antigravity, and other agents that support skills. Then, you can give your agent a prompt like this. Find appropriate CLI software in CLI hub and complete the task.

03:49 And after that, you write your task. So, let’s say I ask it to make a simple architecture diagram. The agent searches the hub. It finds the draw.io CLI, it installs it, then it reads the skill file for that CLI, and starts to run commands. It adds shapes, it connects them, and it exports a PNG at the end. And I did not tell it which tool to use. It found the tool by itself. So, this is pretty cool for sure. Now, let’s come to the main part, which is the CLI generator. This is what you use when the hub does not have the software that you want, or when you have your own internal tool,

04:22 and you want your agents to use it. I will show this in Claude Code, but it also works in Cursor Code X Open Code, Pi, Hermes, GitHub Copilot CLI, and a few more. First, you need to add the marketplace. In Claude Code, run {slash} plugin marketplace add HKUDS {slash} CLI anything. Then run {slash} plugin install cle anything. And that’s it. The plugin is now active. If you use Windows, you need Git for Windows or WSL. Claude Code runs shell commands through Bash, and the plugin needs it. Now, to build a CLI, you run {slash} cle anything, and then you give it a path or

04:56 a GitHub URL. For example, {slash} cle anything. {dot} {slash} Or you can give it the Blender GitHub repo URL. Then the plugin runs a pipeline with seven phases. Let me explain each one. Phase one is analyze. The agent reads the source code. It finds the actions that the GUI does, and it maps each action to the code that does it. Phase two is design. The agent plans the command groups, the state model, and the output formats. Phase three is implement. The agent writes the CLI with the Click library in Python. Every CLI gets a REPL mode, JSON output, and undo and redo.

05:29 Phase four is plan tests. The agent writes a file called test.md with a plan for unit tests and end-to-end tests. Phase five is write tests. The agent writes the tests from that plan. Phase six is document. The agent runs the tests and writes the results back into test.md. In this phase, it also makes a skill.md file. Other agents use this file to discover the CLI. Phase seven is publish. The agent makes a setup.py file and installs the CLI on your path. This takes some time, so let’s wait a bit.

06:02 And it is now done. Now, let’s use the CLI that it made. Go into the agent harness folder and run pip install {dash} e {dot} then you can call it from anywhere. Every CLI has the same name pattern. It is cli-anything {dash} and then the name of the software. So, here it is cli-anything If we run cli-anything {dash} {dash} help, we see all the command groups. Now, let’s make a project. I run cli-anything project new with a width of 1920 and a height of 108, an output file called poster.json. Then I add a layer with the {dash} {dash} json flag. And you can see that the output is clean

06:32 json. This is what the agent reads. The readme also has a good LibreOffice example. So, let’s try that, too. First, I make a new writer document. Then I add a heading that says Q1 report. Then I add a table with four rows and three columns. Then I run the export render command to make a PDF. And here is the PDF. It is a real PDF and LibreOffice made it in headless mode. Now, if you run a CLI with no command, you get the rebel mode. Let’s try it with Blender. I run cli-anything Blender and I get an interactive prompt. I type scene new with the name product shot.

07:05 Then I add a cube mesh. Then I run render execute with the cycles engine. And Blender renders the image in the background. The prompt also shows the scene name and it shows a star when there are changes that are not saved. So, the agent always knows the current state. So, there’s that. Now, the first run does not always cover the full app. For this, there is the refine command. Run {slash} cli-anything {colon} refine and then the path. The agent compares what the software can do with what the CLI can do. Then it adds commands, tests, and docs

07:36 for the gaps. You can also give it a focus. For example, you can say that you want more commands for batch processing and filters. You can run refine many times. Each run adds to the CLI and it does not delete the old work. There are also two more commands. The test command runs the tests and updates test.md. The validate command checks the CLI against the project rules. Those rules are in a file called harness.md. This is the playbook that the agent follows in every phase. It has some good lessons in it. For example, the CLI must use the real software. It must not use Pello in place of Another lesson

08:10 is that an exit code of zero does not prove that an export worked. So, the tests check the real output files. They check magic bytes, file structure, pixels, audio levels, and duration. And the test numbers are good. The readme shows more than 2,400 passing tests across about 30 harnesses. Each harness has unit tests with fake data and end-to-end tests with the real software. Also, if the real software is not installed, the tests fail. They do not skip. I like this a lot because a skipped test can hide a broken CLI.

08:41 The readme also has some good demos. In one demo, an agent builds a Curiosity Rover in FreeCAD step-by-step with a live preview. In another one, an agent builds a sci-fi drone in Blender. There is also an agent that plays Slay the Spire 2 through the CLI. And there is one that drives a live ArcGIS Pro session. So, this is not only for office tools. Now, let’s talk about the limitations because there are some. First, it needs a strong model. The readme says that you need a frontier class model for reliable results. They list models like Claude Opus and Sonnet and GPT-5.4.

09:15 A small local model can make a CLI that is not complete or not correct. So, this is not cheap to run on a big code base. The generation can use a lot of tokens. Second, it works best when you have the source code. If you only have a compiled binary, the quality and the coverage become much lower. Third, one run is often not enough. You will probably need to run refine a few times before the CLI is good for real work. And I will also say this, a CLI that an agent made is still code that an agent made. So, read the tests and check the commands before

09:46 you give it access to important files. Overall, I think that this is a really good idea. GUI agents with screenshots are slow and they cost a lot. A CLI with JSON output is fast, cheap, and easy for an agent to use. And this project does the boring work of making that CLI for you. The CLI hub part is also free and easy to use, even if you never build a CLI yourself. If you use Claude code or Codex a lot, I would install the CLI hub meta skill first. It costs nothing and your agent gets a big set of new tools. Then, if you have an app that is not in

10:18 the hub, try the generator on it. Overall, it’s pretty cool. Anyway, let me know your thoughts in the comments. If you like this video, consider donating through the super [music] thanks option or becoming a member by clicking the join button. Also, give this video [music] a thumbs up and subscribe to my channel. I’ll see you in the next one. Until then, bye. >> [music]

10:49 [bell]