Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
## Introduction CLI-Anything is a Python framework that automatically transforms any software -- GIMP, Blender, LibreOffice, or any codebase -- into agent-native command-line interfaces through an automated 7-phase pipeline. With 18,000 GitHub stars and growing, the project from the HKUDS research group addresses a fundamental bottleneck in AI agent capabilities: most professional software lacks structured APIs that agents can reliably interact with. CLI-Anything generates production-grade CLIs with structured JSON output, comprehensive documentation, and automated test suites, making virtually any desktop application agent-accessible. The core insight behind CLI-Anything is that UI automation (clicking buttons, reading pixels) is inherently fragile and unreliable for AI agents. Instead of trying to teach agents to use GUIs, CLI-Anything generates proper command-line interfaces that expose software functionality in a structured, predictable way that agents can reason about and invoke reliably. ## Architecture and Design CLI-Anything follows a systematic 7-phase pipeline: | Phase | Purpose | Output | |-------|---------|--------| | 1. Analyze | Inspect target software's API, scripting interfaces, and plugin systems | Capability map | | 2. Design | Plan CLI command structure, argument schemas, and output formats | CLI specification | | 3. Implement | Generate CLI code with proper error handling and JSON output | Python CLI module | | 4. Plan Tests | Design test cases covering normal, edge, and error scenarios | Test plan | | 5. Write Tests | Implement automated tests with mocking for GUI-dependent features | Test suite | | 6. Document | Generate man pages, help text, and SKILL.md for agent discoverability | Documentation | | 7. Publish | Package as installable CLI tool with dependency management | pip package | The pipeline uses LLM-powered analysis to understand the target software's capabilities, then generates code that wraps those capabilities in a clean CLI interface. Each generated command accepts JSON input and produces JSON output, creating a machine-friendly interaction layer. A key design decision is the SKILL.md generation in Phase 6. This file follows the emerging standard for AI agent skill discovery, describing what the CLI can do, what inputs it expects, and what outputs it produces. This enables platforms like Claude Code, OpenCode, Codex, and OpenClaw to automatically discover and use the generated tools. ## Key Capabilities **Universal Software Wrapping**: CLI-Anything can generate CLIs for any software that has a scripting interface, plugin API, command-line API, or even a well-documented GUI workflow. Tested targets include GIMP (image manipulation), Blender (3D modeling), LibreOffice (document processing), FFmpeg (media processing), and dozens of custom codebases. **Structured JSON I/O**: Every generated CLI command accepts structured JSON arguments and returns structured JSON results. This eliminates the parsing ambiguity that makes raw text output unreliable for AI agents. Error responses follow a consistent schema with error codes, messages, and suggested fixes. **Automated Test Generation**: The pipeline generates comprehensive test suites with 1,588+ passing tests across target applications. Tests cover normal operation, edge cases, invalid inputs, and error recovery. GUI-dependent features are automatically mocked for headless testing. **Multi-Platform Agent Support**: Generated CLIs work with Claude Code, OpenCode, OpenAI Codex CLI, OpenClaw, and any MCP-compatible agent. The SKILL.md file enables automatic tool discovery across platforms. **Incremental Generation**: For large software targets, CLI-Anything supports incremental generation -- you can generate CLIs for specific features or modules without wrapping the entire application. New commands can be added to existing CLI packages without regenerating everything. **Quality Assurance**: Each generated CLI includes input validation, comprehensive error messages, usage examples, and type checking. The framework enforces consistency across commands through shared schemas and conventions. ## Developer Integration Generating a CLI for a target application: ```bash pip install cli-anything # Analyze and generate CLI for GIMP cli-anything generate --target gimp --output ./gimp-cli # Generate for a custom codebase cli-anything generate --target ./my-project --output ./my-project-cli # Generate for specific features only cli-anything generate --target blender --features "mesh,material,render" --output ./blender-cli ``` Using a generated CLI: ```bash # GIMP CLI example gimp-cli resize --input photo.jpg --width 800 --height 600 --output resized.jpg # Returns structured JSON # {"status": "success", "output_path": "resized.jpg", "dimensions": {"width": 800, "height": 600}} ``` The generated SKILL.md enables agent discovery: ```markdown # gimp-cli Image manipulation CLI for GIMP. ## Commands - resize: Resize images to specified dimensions - crop: Crop images by region or aspect ratio - filter: Apply image filters (blur, sharpen, etc.) ``` ## Limitations CLI-Anything's quality depends heavily on the target software's existing API surface. Software with poor or undocumented APIs will produce less complete CLIs. The LLM-powered analysis step requires API access and incurs costs proportional to the complexity of the target software. Generated CLIs for GUI-heavy applications may not cover all visual workflows, particularly those involving drag-and-drop, drawing, or real-time preview. The Python implementation means generated CLIs have a Python runtime dependency. Some enterprise software with proprietary scripting languages may require custom adapter development. The 7-phase pipeline can take 15-30 minutes for large targets. ## Who Should Use This CLI-Anything is invaluable for teams building AI agent workflows that need to interact with professional software. DevOps engineers who want to automate design, document processing, or media workflows through AI agents can generate the necessary CLI interfaces without manual wrapper development. AI platform builders who need to expand their agents' tool capabilities across diverse software ecosystems benefit from the universal wrapping approach. Researchers studying agent tool use can use CLI-Anything to rapidly generate controlled tool environments for experimentation.