Build powerful, stateful CLI interfaces for any GUI application using the cli-anything harness methodology.
The cli-anything plugin automates the process of creating production-ready command-line interfaces for GUI applications. It follows a proven methodology that has successfully generated CLIs for GIMP, Blender, Inkscape, Audacity, LibreOffice, OBS Studio, and Kdenlive — with over 1,100 passing tests across all implementations.
This plugin transforms GUI applications into agent-usable CLIs by:
The result: A stateful CLI with REPL mode, JSON output, undo/redo, and full test coverage.
/plugin install cli-anything@your-registry
Clone this repository to your Claude Code plugins directory:
cd ~/.claude/plugins
git clone https://github.com/yourusername/cli-anything-plugin.git
Reload plugins:
/reload-plugins
click - CLI frameworkpytest - Testing framework~/.claude/plugins/cli-anything/HARNESS.md)Windows note: Claude Code runs shell commands via bash. On Windows, install Git for Windows (includes bash and
cygpath) or use WSL; otherwise commands may fail with cygpath: command not found.
Install Python dependencies:
pip install click pytest
Build a complete CLI harness for any software application. Accepts a local path to the software source code or a GitHub repository URL.
Examples:
# Build from local source
/cli-anything /home/user/gimp
# Build from a GitHub repo
/cli-anything https://github.com/blender/blender
This runs all phases:
Refine an existing CLI harness to expand coverage. Analyzes gaps between the software's full capabilities and what the current CLI covers, then iteratively adds new commands and tests.
Examples:
# Broad refinement — agent finds gaps across all capabilities
/cli-anything:refine /home/user/gimp
# Focused refinement — agent targets a specific functionality area
/cli-anything:refine /home/user/shotcut "vid-in-vid and picture-in-picture compositing"
/cli-anything:refine /home/user/blender "particle systems and physics simulation"
Run tests for a CLI harness and update TEST.md with results.
Examples:
# Run all tests for GIMP CLI
/cli-anything:test /home/user/gimp
# Run tests for Blender from GitHub
/cli-anything:test https://github.com/blender/blender
Validate a CLI harness against HARNESS.md standards and best practices.
Examples:
# Validate GIMP CLI
/cli-anything:validate /home/user/gimp
# Validate from GitHub repo
/cli-anything:validate https://github.com/blender/blender
List all available CLI-Anything tools, including both installed packages and generated directories.
Options:
--path <directory> - Directory to search (default: current directory)--depth <n> - Maximum recursion depth (default: unlimited). Scans depths 0 through N.--json - Output in JSON formatExamples:
# List all tools in current directory (unlimited depth)
/cli-anything:list
# List tools with depth limit
/cli-anything:list --depth 2
# List tools with JSON output
/cli-anything:list --json
# Search a specific directory with depth limit
/cli-anything:list --path /projects/my-tools --depth 3
Output includes:
Analyze the target application:
Output: Software-specific SOP document (e.g., GIMP.md)
Design the CLI structure:
Output: Architecture documented in SOP
Build the CLI:
ReplSkin (copy repl_skin.py from plugin to utils/)--json flag for machine-readable outputinvoke_without_command=True so bare cli-anything-<software> enters REPLOutput: Working CLI at agent-harness/cli_anything/<software>/
Plan comprehensive tests:
Output: TEST.md Part 1 (the plan)
Write the tests:
test_core.py - Unit tests (synthetic data)test_full_e2e.py - E2E tests (real files)TestCLISubprocess class using _resolve_cli("cli-anything-<software>") to
test the installed command via subprocess (falls back to python -m in dev)Output: Complete test suite
Run and document:
pytest -v --tb=noTEST.mdOutput: TEST.md Part 2 (the results)
Generate AI-discoverable skill definition:
skill_generator.pycli_anything/<software>/skills/SKILL.md (inside the Python package)Output: SKILL.md file for AI agent discovery
Package and install:
setup.py with find_namespace_packages(include=["cli_anything.*"])cli_anything/<software>/ (no __init__.py in cli_anything/)pip install -e .which cli-anything-<software>Output: Installable package ready for distribution
<software>/ └── agent-harness/ ├── <SOFTWARE>.md # Software-specific SOP ├── setup.py # PyPI config (find_namespace_packages) └── cli_anything/ # Namespace package (NO __init__.py) └── <software>/ # Sub-package (HAS __init__.py) ├── README.md # Installation and usage ├── <software>_cli.py # Main CLI entry point ├── __init__.py ├── __main__.py # python -m cli_anything.<software> ├── core/ # Core modules │ ├── __init__.py │ ├── project.py # Project management │ ├── session.py # Undo/redo │ ├── export.py # Rendering/export │ └── ... # Domain-specific modules ├── skills/ # AI-discoverable skill definition │ └── SKILL.md # Installed with the package via package_data ├── utils/ # Utilities │ ├── __init__.py │ ├── repl_skin.py # Unified REPL skin (copy from plugin) │ └── ... └── tests/ ├── __init__.py ├── TEST.md # Test plan + results ├── test_core.py # Unit tests └── test_full_e2e.py # E2E tests
All CLIs use PEP 420 namespace packages under cli_anything.*. The cli_anything/
directory has NO __init__.py, allowing multiple separately-installed CLI packages
to coexist in the same Python environment without conflicts.
The cli-anything methodology has successfully built CLIs for:
| Software | Tests | Description |
|---|---|---|
| GIMP | 103 | Raster image editor (Pillow-based) |
| Blender | 200 | 3D creation suite (bpy script generation) |
| Inkscape | 197 | Vector graphics editor (SVG manipulation) |
| Audacity | 154 | Audio editor (WAV processing) |
| LibreOffice | 143 | Office suite (ODF ZIP/XML) |
| OBS Studio | 153 | Streaming/recording (JSON scene collections) |
| Kdenlive | 151 | Video editor (MLT XML) |
| Shotcut | 144 | Video editor (MLT XML, ffmpeg) |
| Total | 1,245 | All tests passing |
--json flag)ReplSkin with branded banner, colored prompts, and styled messagesprompt_toolkitsuccess(), error(), warning(), info(), status(), table(), progress()_resolve_cli() against the installed commandCLI_ANYTHING_FORCE_INSTALLED=1) for release validationcli_anything.*cli-anything-<software>pip install cli-anything-<software>which cli-anything-<software>✅ Good for:
❌ Not ideal for:
After building a CLI with this plugin, you can:
cd /root/cli-anything/<software>/agent-harness
pip install -e .
cli-anything-<software> --help
pip install build twine python -m build twine upload dist/*
pip install cli-anything-<software>
cli-anything-<software> --help # Available in PATH
This makes CLIs discoverable by AI agents that can check which cli-anything-<software> to find available tools.
pip list | grep -E 'click|pytest'python3 --version (need 3.10+)/cli-anything:validate <software>ls -la /root/cli-anything/<software>/agent-harness/cli_anything/<software>//cli-anything <software-path>__init__.py files exist in all packagesecho $PYTHONPATHpip show cli-anything-<software>pip show -f cli-anything-<software> | grep console_scriptspip uninstall cli-anything-<software> && pip install cli-anything-<software>echo $PATH | grep -o '[^:]*bin'To add support for new software:
/cli-anything <software-name>MIT License - See LICENSE file for details
Built on the cli-anything methodology developed through the creation of 8 production CLI harnesses with 1,245 passing tests.
Inspired by the ralph-loop plugin's iterative development approach.
/root/cli-anything/ for reference implementationsskill_generator.py module for extracting CLI metadataSKILL.md.template for customizable skill definitions_resolve_cli() helper for subprocess tests against installed commandsCLI_ANYTHING_FORCE_INSTALLED=1 env var for release validation