GitHub - HKUDS/CLI-Anything: CLI-Anything: Making ALL Software Agent-Native
Service

GitHub - HKUDS/CLI-Anything: CLI-Anything: Making ALL Software Agent-Native

HKUDS
2026.03.30
·GitHub·by 이호민
#Agent#AI#Automation#CLI#Software

Key Points

  • 1CLI-Anything is a novel framework that automatically generates full-featured, agent-native Command Line Interfaces (CLIs) for any software, bridging the gap between AI agents and diverse applications.
  • 2It employs a 7-phase automated pipeline for analysis, design, implementation, and rigorous testing, ensuring direct integration with software backends and providing structured output for AI consumption.
  • 3By enabling universal agent control over software and offering a CLI-Hub for autonomous discovery, CLI-Anything aims to transform traditional tools into a future-ready, agent-centric ecosystem.

CLI-Anything is a framework designed to bridge the gap between AI agents and existing software by transforming traditional applications into "agent-native" tools through the creation of structured Command Line Interfaces (CLIs). It addresses the limitations of AI agents in interacting with real-world software, which often stem from fragile UI automation, restricted APIs, or incomplete reimplementations.

The core methodology of CLI-Anything is an automated 7-phase pipeline that generates a fully functional CLI for any given software codebase or repository. This pipeline is initiated via an AI coding agent command (e.g., /cliβˆ’anything:cliβˆ’anything<softwareβˆ’pathβˆ’orβˆ’repo>/cli-anything:cli-anything <software-path-or-repo>) and encompasses the following stages:

  1. Analyze: The system scans the software's source code and maps its Graphical User Interface (GUI) actions to underlying APIs or functionalities.
  2. Design: It architects the CLI's command groups, defines a state model for persistent interactions, and specifies output formats.
  3. Implement: A Click-based CLI is built, incorporating features like a Read-Eval-Print Loop (REPL) for interactive sessions, structured JSON output for machine consumption, and support for undo/redo operations.
  4. Plan Tests: The system generates a TEST.md document outlining unit and end-to-end test plans for the newly created CLI.
  5. Write Tests: Comprehensive test suites are implemented based on the generated plans to ensure functionality and reliability.
  6. Document: The TEST.md is updated with the results of the executed tests, and other relevant documentation is generated.
  7. Publish: A setup.py file is created, enabling the CLI to be installed to the system's PATH, making it discoverable and usable.

Post-generation, the CLI can be iteratively refined using a command like /cli-anything:refine, which performs a gap analysis between the software's full capabilities and the current CLI coverage, then implements new commands, tests, and documentation incrementally.

The project posits that CLIs are the universal interface for both humans and AI agents due to their structured, composable, lightweight, self-describing nature, and their ability to provide deterministic and reliable results with agent-first design (e.g., structured JSON output).

Key features and architectural principles include:

  • Authentic Software Integration: CLIs generate valid project files (e.g., ODF, MLT XML, SVG) and delegate operations to real applications, ensuring full fidelity and capability without simulation or compromise.
  • Flexible Interaction Models: Each generated CLI supports both a stateful REPL mode for interactive agent sessions and a subcommand interface for scripting and automated pipelines.
  • Consistent User Experience: A unified repl_skin.py module ensures all generated CLIs share a consistent interactive experience with branded banners, styled prompts, and standardized formatting.
  • Agent-Native Design: All commands include a --json flag for structured data output, and capabilities are discoverable via standard --help flags and which commands.
  • Zero Compromise Dependencies: The framework explicitly requires the target software's backend to be present; tests will fail if dependencies are missing, guaranteeing authentic functionality.
  • Production-Grade Testing: Generated CLIs undergo multi-layered validation, including unit tests, native end-to-end tests (checking file structure), true backend end-to-end tests (invoking actual software and verifying output), and CLI subprocess tests. A total of 1,917 tests across 19 applications have demonstrated a 100% pass rate.
  • SKILL.md Generation: Each installed CLI includes a SKILL.md file within its Python package (cli_anything/<software>/skills/SKILL.md). This YAML-formatted skill definition, auto-generated from Click decorators and package metadata, provides agents with a name, description, command groups, usage examples, and guidance for programmatic use, enabling autonomous skill discovery by agents (e.g., Claude Code, OpenClaw).

CLI-Anything also introduces the CLI-Hub, a central registry (registry.json) for community-built CLIs. It features a meta-skill (cli-hub-meta-skill) that allows AI agents to autonomously discover and install CLIs from the hub via a single pip install command, reading a live catalog at https://hkuds.github.io/CLI-Anything/SKILL.txt.

The project supports integration with various AI coding agents like Claude Code, OpenCode, Goose, Qodercli, OpenClaw, Codex, and GitHub Copilot CLI, with plans for more. It is applicable to diverse software domains, including GitHub repositories, AI/ML platforms, data & analytics tools, development tools, creative & media applications, scientific computing, enterprise & office suites, communication & collaboration platforms, diagramming tools, network & infrastructure management, graphics debugging, and AI content generation.