Back to Blog

CLI Anything + Claude Code: Agent-Native Tools

8 min read

CLI Anything + Claude Code: How to Make Any Software Agent-Controllable

CLI Anything is an open-source tool that lets you point at any software's source code and automatically generate a command-line interface that AI agents like Claude Code can control directly. Built by the Data Intelligence Lab at HKU (the same team behind LightRAG, RAG Anything, and nanobot), it runs a fully automated 7-phase pipeline that transforms human-designed software into agent-native tools with a single command. I've been testing it, and the implications for agentic coding workflows are massive. Here's exactly how it works and how to set it up yourself.

Why Are Claude Code Users Switching from MCP to CLI Tools?

If you've been paying attention to the Claude Code scene at all, you've noticed a dramatic shift from MCP tools to command-line interfaces. The reason is pretty simple: it's a huge performance increase.

Claude Code already lives in the terminal. The CLI lives in the terminal. There's no middleman, no overhead, no config, nothing stopping your agent from communicating directly with the program. MCP tools add a layer of abstraction that, frankly, slows things down. CLI tools strip that out entirely.

Think about it like this: MCP is like calling someone through a switchboard operator. CLI is a direct line. Same conversation, way less friction.

So if it's clear that this is where agentic coding is heading, the next question becomes: can we speed this up? Can we create CLI tools that interact with software we're already using — without writing them from scratch?

That's exactly what CLI Anything does.

What Is CLI Anything and Who Built It?

CLI Anything is an open-source tool from the Data Intelligence Lab at HKU (Hong Kong University) that automatically generates agent-ready CLI interfaces for any software with a codebase. You point it at a repo, it scans the source code, and it builds a complete CLI tool — with tests, documentation, and everything.

If you don't know the HKU Data Intelligence Lab, you should. They're the team behind LightRAG (28,000+ GitHub stars), nanobot (28,000+ stars), and RAG Anything (13,000+ stars). These are some of the most prolific builders in the AI open-source community. When they ship something, it's worth your time.

Their tagline sums it up: "Every software becomes instantly agent-controllable through structured CLI. Agents control any applications without APIs, GUI, rebuilding, or complex wrappers."

That means software that was designed for you to click through with a mouse — like Gmail, Blender, draw.io, Audacity — can now be controlled by Claude Code via text commands in the terminal.

How Does CLI Anything's 7-Phase Pipeline Work?

Once you install CLI Anything and point it at a target repo, it runs an automated 7-phase pipeline. You don't have to touch anything. Here's what each step does:

  1. Analyze — Scans the source code and maps GUI actions to underlying APIs
  2. Design — Architects command groups, state models, and output formats
  3. Implement — Builds a real Click-based CLI with REPL and JSON output
  4. Plan Tests — Creates a TEST.md with the testing strategy
  5. Write Tests — Implements the full test suite (unit + end-to-end)
  6. Document — Updates documentation with usage instructions
  7. Publish — Creates setup.py and installs the CLI to your PATH

The whole thing takes about 20 minutes for a mid-sized project. And once it's done, you get a production-quality CLI tool — not a toy wrapper. We're talking REPL support, undo/redo functionality, structured JSON output for agent consumption, and comprehensive test coverage.

The team has already proven this on major open-source projects. Their pre-built CLIs include tools for Blender (28 passing tests), Inkscape, Audacity, GIMP, LibreOffice, draw.io (138 passing tests), and more. These aren't demos — they're battle-tested implementations.

And here's the kicker: if the first pass isn't perfect, you can iterate and refine the CLI tool afterward. It's not a one-shot deal.

How Do You Set Up CLI Anything with Claude Code?

The setup is surprisingly straightforward. You need two things: Python 3.10+ and the target software installed. Here's the step-by-step:

Step 1: Create a working directory

Open your terminal and create a new directory for the project. Something like cli-anything-demo.

Step 2: Install the CLI Anything plugin in Claude Code

Fire up Claude Code, then run these two commands (available in the CLI Anything GitHub repo):

  • Add the CLI Anything tool to the marketplace
  • Install it

You can verify the install worked by typing /plugin, going to "installed," and checking that CLI Anything shows up as enabled. Important: after installing, you need to either restart Claude Code or run /reload plugins to get it running.

Step 3: Clone the target software repo

For this demo, we're using draw.io. Tell Claude Code to clone the open-source draw.io repository. It'll pull the entire codebase into your directory.

Step 4: Run CLI Anything

Now the magic line. Just type:

cli-anything ./draw.io

Point it at wherever the cloned repo lives. Hit enter. That's it.

The pipeline will churn through all 7 phases. Expect about 20 minutes for something draw.io's size. When it's done, you'll see a message confirming all success criteria are met, along with the architecture breakdown, test results, and key capabilities.

One command. That's the entire setup. Clone the repo, run the tool, done.

What Can You Actually Do With a CLI-Anything-Generated Tool?

Here's where it gets interesting. I pointed the generated draw.io CLI at Claude Code and gave it this prompt:

"Let's test out the new draw CLI tool. Create me a thorough yet clear diagram explaining a typical SaaS backend architecture. Make it visually striking. Pull up the draw diagram for me at the end."

Claude Code looked at the draw.io package, referenced the agent harness (that's the nomenclature it uses for the CLI wrapper), and built out a full SaaS backend architecture diagram — complete with shading, proper layout, and multiple interconnected components.

The point isn't "look how cool this draw.io diagram is." The point is that this CLI tool didn't exist 10 minutes earlier, and a single text prompt produced a fairly complicated, well-laid-out diagram through software that normally requires you to drag and drop things with a mouse.

Now think about what this means for your own workflows. Any open-source project — or any project where you have access to the backend code — can be turned into a CLI tool that Claude Code controls. The draw.io CLI alone supports 15 shape presets, 4 edge styles, multi-page diagrams, export to PNG/SVG/PDF, and 50 levels of undo/redo. All controllable through text.

What Are the Best Use Cases for CLI Anything?

The obvious ones are the pre-built CLIs the team already ships:

  • Blender — 3D modeling and rendering controlled by text commands
  • Inkscape — Vector graphics editing without touching the GUI
  • Audacity — Audio editing and processing via CLI
  • GIMP — Image manipulation through structured commands
  • LibreOffice — Document creation and editing programmatically
  • draw.io — Diagram creation (as we demoed)

But the real power is in the custom use cases. Think about:

  • Internal tools your team uses that have open-source codebases — turn them into CLI tools for automated workflows
  • Design tools where you need batch operations — generate 50 diagrams from a spreadsheet of requirements
  • Creative software where AI agents can handle the repetitive work — let Claude Code handle layout while you focus on content
  • Any GUI-heavy software that bottlenecks your workflow because you have to click through menus manually

The constraint right now is that the target software needs to be open source (or at least you need access to the source code). CLI Anything needs to see the guts of the application to build the CLI. But within that constraint, the possibilities are wide open.

How Does This Compare to Building Custom MCP Servers?

Look, MCP servers aren't going away. They still have legitimate use cases, especially for connecting to cloud services and APIs. But for local software control? CLIs are winning, and it's not close.

Here's the practical comparison:

MCP ServerCLI Anything
Setup timeHours to days~20 minutes
OverheadProtocol layer + configDirect terminal execution
MaintenanceManual updates neededRe-run pipeline on new version
PerformanceGoodFaster (no middleman)
Coding requiredYes, significantOne command

CLI Anything generates a complete, tested CLI tool with a single command. Building an equivalent MCP server means writing custom code, handling the protocol layer, managing config, and maintaining it yourself. For open-source desktop software, CLI Anything is the obvious choice.

FAQ

Does CLI Anything work with closed-source software?

No. CLI Anything needs access to the source code to analyze the application and map GUI actions to underlying APIs. If the software is proprietary and you don't have access to the codebase, this tool won't work. It specifically requires an open-source repo or a project where you have full backend access.

How long does it take to generate a CLI tool?

Expect about 20 minutes for a mid-sized project like draw.io. Larger applications like Blender may take longer. The 7-phase pipeline — analyze, design, implement, test planning, test writing, documentation, and publishing — runs fully automatically, so you just kick it off and wait.

Can I customize the generated CLI after it's built?

Yes. CLI Anything supports iterative refinement. If the first pass doesn't include features you need or the command structure isn't quite right, you can continue to add capabilities and improve the tool. You're not locked into whatever the initial generation produces.

What do I need installed to use CLI Anything?

You need Python 3.10 or higher, Claude Code, and the target software installed on your machine. The CLI Anything tool itself installs as a Claude Code plugin from the marketplace. The whole setup process takes a few minutes before you can start generating CLIs.

Is this only useful for Claude Code or does it work with other AI agents?

While this walkthrough focuses on Claude Code, CLI Anything generates standard command-line tools that any AI agent can use — including Cursor, nanobot, or any other agent that can execute terminal commands. The generated CLIs also support JSON output mode specifically designed for AI agent consumption.


If you want to go deeper into agentic coding and Claude Code workflows, join the free Chase AI community for templates, prompts, and live breakdowns. And if you're serious about building with AI, check out the paid community, Chase AI+, for hands-on guidance on how to make money with AI.