cli-anything-agent-native
```markdown
What this skill does
```markdown
---
name: cli-anything-agent-native
description: Make any software agent-controllable by generating a complete CLI harness with JSON output, REPL, tests, and docs in one command
triggers:
- make this software agent-native
- generate a CLI harness for this app
- use cli-anything to wrap this software
- build an agent-ready CLI for this project
- cli-anything build harness
- make this tool work with AI agents
- wrap this application with a CLI using cli-anything
- use cli-anything to expose this software to agents
---
# CLI-Anything: Making ALL Software Agent-Native
> Skill by [ara.so](https://ara.so) โ Daily 2026 Skills collection.
CLI-Anything generates a full agent-ready CLI harness for any software in one command. It analyzes source code or repos, designs a Click-based CLI with structured JSON output, implements REPL interaction, writes comprehensive tests, and publishes to PATH โ bridging AI agents and the world's software through the universal CLI interface.
---
## What CLI-Anything Does
Given any software (local path or GitHub repo), CLI-Anything runs a **7-phase pipeline**:
1. ๐ **Analyze** โ Scans source, maps GUI actions to APIs
2. ๐ **Design** โ Architects command groups, state model, output formats
3. ๐จ **Implement** โ Builds Click CLI with REPL, JSON output, undo/redo
4. ๐ **Plan Tests** โ Creates `TEST.md` with unit + E2E test plans
5. ๐งช **Write Tests** โ Implements comprehensive test suite
6. ๐ **Document** โ Updates `TEST.md` with results
7. ๐ฆ **Publish** โ Creates `setup.py`, installs to PATH
The output lives in `<software>/agent-harness/` and is immediately usable by any AI agent.
---
## Installation
### Prerequisites
- Python 3.10+
- Target software installed (GIMP, Blender, LibreOffice, or any app)
- A supported AI coding agent (Claude Code, OpenCode, OpenClaw, Codex, Qodercli)
### Claude Code (Recommended)
```bash
# Add the CLI-Anything marketplace
/plugin marketplace add HKUDS/CLI-Anything
# Install the plugin
/plugin install cli-anything
```
> **Windows users:** Claude Code uses `bash`. Install Git for Windows (includes `bash` + `cygpath`) or use WSL to avoid `cygpath: command not found` errors.
### Manual Installation (Claude Code)
```bash
git clone https://github.com/HKUDS/CLI-Anything.git
cp -r CLI-Anything/cli-anything-plugin ~/.claude/plugins/cli-anything
/reload-plugins
```
### OpenCode
```bash
git clone https://github.com/HKUDS/CLI-Anything.git
# Global install
cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/commands/
cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/commands/
# Or project-level
cp CLI-Anything/opencode-commands/*.md .opencode/commands/
cp CLI-Anything/cli-anything-plugin/HARNESS.md .opencode/commands/
```
### OpenClaw
```bash
git clone https://github.com/HKUDS/CLI-Anything.git
mkdir -p ~/.openclaw/skills/cli-anything
cp CLI-Anything/openclaw-skill/SKILL.md ~/.openclaw/skills/cli-anything/SKILL.md
```
Then invoke: `@cli-anything build a CLI for ./gimp`
### Codex
```bash
git clone https://github.com/HKUDS/CLI-Anything.git
bash CLI-Anything/codex-skill/scripts/install.sh
# Windows: .\CLI-Anything\codex-skill\scripts\install.ps1
```
### Qodercli
```bash
git clone https://github.com/HKUDS/CLI-Anything.git
bash CLI-Anything/qoder-plugin/setup-qodercli.sh
```
---
## Core Commands
### Building a Harness
```bash
# Claude Code โ generate full CLI for a local app
/cli-anything:cli-anything ./gimp
# Claude Code โ generate from a GitHub repo
/cli-anything:cli-anything https://github.com/blender/blender
# OpenCode
/cli-anything ./gimp
/cli-anything https://github.com/blender/blender
# Codex (natural language)
# "Use CLI-Anything to build a harness for ./gimp"
```
> **Claude Code < 2.x:** Use `/cli-anything` instead of `/cli-anything:cli-anything`.
### Refining an Existing Harness
```bash
# Broad refinement โ agent analyzes all gaps
/cli-anything:refine ./gimp
# Focused refinement โ target a specific area
/cli-anything:refine ./gimp "image batch processing and filters"
# OpenCode equivalents
/cli-anything-refine ./gimp
/cli-anything-refine ./gimp "batch processing and filters"
# Codex
# "Use CLI-Anything to refine ./shotcut for picture-in-picture workflows"
```
Refine is **incremental and non-destructive** โ run it multiple times to expand coverage.
### Validation & Testing
```bash
# OpenCode: validate the generated harness
/cli-anything-validate ./gimp
# OpenCode: run tests
/cli-anything-test ./gimp
# Codex
# "Use CLI-Anything to validate ./libreoffice"
```
### Listing Available Harnesses
```bash
# OpenCode
/cli-anything-list
```
---
## Using a Generated CLI
After the pipeline completes, the harness is in `<software>/agent-harness/`.
### Install to PATH
```bash
cd gimp/agent-harness
pip install -e .
```
### Basic Usage
```bash
# Get help (self-documenting for agents)
cli-anything-gimp --help
cli-anything-gimp layer --help
# Create a new project
cli-anything-gimp project new --width 1920 --height 1080 -o poster.json
# Add a layer (JSON output mode)
cli-anything-gimp --json layer add -n "Background" --type solid --color "#1a1a2e"
# Open a file
cli-anything-gimp file open ./image.png
# Export
cli-anything-gimp file export --format png --output ./out.png
```
### JSON Output Mode
Every command supports `--json` for structured agent consumption:
```bash
cli-anything-gimp --json project new --width 800 --height 600
```
```json
{
"status": "ok",
"command": "project new",
"result": {
"width": 800,
"height": 600,
"layers": [],
"id": "proj_abc123"
}
}
```
On error:
```json
{
"status": "error",
"command": "layer add",
"error": "No active project. Run `project new` or `file open` first.",
"code": "NO_ACTIVE_PROJECT"
}
```
### Interactive REPL
```bash
# Enter REPL (stateful session)
cli-anything-gimp
# Inside REPL:
# > project new --width 1920 --height 1080
# > layer add -n "Sky" --type gradient
# > layer add -n "Text" --type text --content "Hello"
# > undo
# > redo
# > file export --format jpeg --quality 90
# > exit
```
### Undo / Redo
```bash
cli-anything-gimp undo
cli-anything-gimp redo
cli-anything-gimp history --last 10
```
---
## Generated Harness Structure
```
gimp/
โโโ agent-harness/
โโโ setup.py # pip-installable package
โโโ TEST.md # Test plan + results
โโโ cli_anything_gimp/
โ โโโ __init__.py
โ โโโ main.py # Click CLI entrypoint
โ โโโ commands/
โ โ โโโ project.py # project new/open/save/close
โ โ โโโ layer.py # layer add/remove/reorder/merge
โ โ โโโ filter.py # filter apply/list/preview
โ โ โโโ file.py # file open/export/import
โ โ โโโ ...
โ โโโ state.py # Application state model
โ โโโ output.py # JSON + human output formatting
โ โโโ repl.py # Interactive REPL
โโโ tests/
โโโ unit/
โ โโโ test_project.py
โ โโโ test_layer.py
โ โโโ ...
โโโ e2e/
โโโ test_workflow_poster.py
โโโ ...
```
---
## Writing a Custom Harness (Python Pattern)
If you need to manually create or extend a harness, here's the standard pattern CLI-Anything follows:
### Entry Point (`main.py`)
```python
import click
import json
import sys
from .state import AppState
from .output import output_result, output_error
from .commands import project, layer, file_ops, filters
@click.group()
@click.option("--json", "json_mode", is_flag=True, default=False,
help="Output results as JSON for agent consumption")
@click.pass_context
def cli(ctx, json_mode):
"""CLI-Anything harness for GIMP โ agent-ready interface."""
ctx.ensure_object(dict)
ctx.obj["json_mode"] = json_mode
ctx.obj["state"] = AppState()
cli.add_command(project.group)
cli.add_command(layer.group)
cli.add_command(file_ops.group)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.