diff --git a/.gitignore b/.gitignore index 3527450a0..5cb30e6b3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ # Step 3: Allow cli-anything-plugin entirely !/cli-anything-plugin/ !/codex-skill/ +!/openclaw-skill/ # Step 4: Allow each software dir (top level only) !/gimp/ diff --git a/README.md b/README.md index c2bd6fa7a..93b4e3d7c 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ CLI is the universal interface for both humans and AI agents: - **Python 3.10+** - Target software installed (e.g., GIMP, Blender, LibreOffice, or your own application) -- A supported AI coding agent: [Claude Code](#-claude-code) | [OpenCode](#-opencode) | [Codex](#-codex) | [Qodercli](#-qodercli) | [More Platforms](#-more-platforms-coming-soon) +- A supported AI coding agent: [Claude Code](#-claude-code) | [OpenClaw](#-openclaw) | [OpenCode](#-opencode) | [Codex](#-codex) | [Qodercli](#-qodercli) | [More Platforms](#-more-platforms-coming-soon) ### Pick Your Platform @@ -211,6 +211,33 @@ This registers the cli-anything plugin in `~/.qoder.json`. Start a new Qodercli
+

⚡ OpenClaw

+ +**Step 1: Install the Skill** + +CLI-Anything provides a native OpenClaw `SKILL.md` file. Copy it to your OpenClaw skills directory: + +```bash +# Clone the repo +git clone https://github.com/HKUDS/CLI-Anything.git + +# Install to the global skills folder +mkdir -p ~/.openclaw/skills/cli-anything +cp CLI-Anything/openclaw-skill/SKILL.md ~/.openclaw/skills/cli-anything/SKILL.md +``` + +**Step 2: Build a CLI** + +Now you can invoke the skill inside OpenClaw: + +`@cli-anything build a CLI for ./gimp` + +The skill follows the same 7-phase methodology as Claude Code and OpenCode. + +
+ +
+

⚡ Codex Experimental Community

**Step 1: Install the Skill** diff --git a/README_CN.md b/README_CN.md index 5a1b9a20a..655521c37 100644 --- a/README_CN.md +++ b/README_CN.md @@ -56,7 +56,7 @@ CLI 是人类和 AI Agent 共通的万能接口: - **Python 3.10+** - 目标软件已安装(如 GIMP、Blender、LibreOffice 或你自己的应用) -- 支持的 AI 编程工具之一:[Claude Code](#-claude-code) | [OpenCode](#-opencode) | [Codex](#-codex) | [Qodercli](#-qodercli) | [更多平台](#-更多平台即将支持) +- 支持的 AI 编程工具之一:[Claude Code](#-claude-code) | [OpenClaw](#-openclaw) | [OpenCode](#-opencode) | [Codex](#-codex) | [Qodercli](#-qodercli) | [更多平台](#-更多平台即将支持) ### 选择你的平台 @@ -151,12 +151,12 @@ cp -r CLI-Anything/cli-anything-plugin ~/.claude/plugins/cli-anything git clone https://github.com/HKUDS/CLI-Anything.git # 全局安装(所有项目可用) -cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/commands/ -cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/commands/ +cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/command/ +cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/command/ # 或项目级安装 -cp CLI-Anything/opencode-commands/*.md .opencode/commands/ -cp CLI-Anything/cli-anything-plugin/HARNESS.md .opencode/commands/ +cp CLI-Anything/opencode-commands/*.md .opencode/command/ +cp CLI-Anything/cli-anything-plugin/HARNESS.md .opencode/command/ ``` > **注意:** `HARNESS.md` 是所有命令引用的方法论规范,必须和命令文件放在同一目录下。 @@ -211,6 +211,33 @@ bash CLI-Anything/qoder-plugin/setup-qodercli.sh
+

⚡ OpenClaw

+ +**第一步:安装 Skill** + +CLI-Anything 提供了原生的 OpenClaw `SKILL.md` 文件。请将其复制到你的 OpenClaw 技能目录: + +```bash +# Clone the repo +git clone https://github.com/HKUDS/CLI-Anything.git + +# Install to the global skills folder +mkdir -p ~/.openclaw/skills/cli-anything +cp CLI-Anything/openclaw-skill/SKILL.md ~/.openclaw/skills/cli-anything/SKILL.md +``` + +**第二步:构建 CLI** + +安装完成后,你就可以在 OpenClaw 中直接调用: + +`@cli-anything build a CLI for ./gimp` + +该技能采用了与 Claude Code 和 OpenCode 一致的 7 步构建流程。 + +
+ +
+

⚡ Codex 实验性 社区贡献

**第一步:安装 Skill** @@ -751,8 +778,8 @@ git clone https://github.com/HKUDS/CLI-Anything.git # 请确保使用最新 OpenCode,旧版本可能使用不同的命令目录路径 # 复制命令和 HARNESS.md 到 OpenCode 命令目录 -cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/commands/ -cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/commands/ +cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/command/ +cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/command/ # 为任何有代码库的软件生成 CLI /cli-anything <软件路径或仓库> diff --git a/README_JA.md b/README_JA.md index 277055f67..d36680dce 100644 --- a/README_JA.md +++ b/README_JA.md @@ -56,7 +56,7 @@ CLIは人間とAIエージェント両方にとって普遍的なインターフ - **Python 3.10+** - 対象ソフトウェアがインストール済みであること(例:GIMP、Blender、LibreOffice、または独自のアプリケーション) -- サポートされているAIコーディングエージェント: [Claude Code](#-claude-code) | [OpenCode](#-opencode) | [Codex](#-codex) | [Qodercli](#-qodercli) | [その他のプラットフォーム](#-その他のプラットフォーム近日公開) +- サポートされているAIコーディングエージェント: [Claude Code](#-claude-code) | [OpenClaw](#-openclaw) | [OpenCode](#-opencode) | [Codex](#-codex) | [Qodercli](#-qodercli) | [その他のプラットフォーム](#-その他のプラットフォーム近日公開) ### プラットフォームを選択 @@ -146,12 +146,12 @@ CLI-Anythingのコマンド**と** `HARNESS.md` をOpenCodeのコマンドディ git clone https://github.com/HKUDS/CLI-Anything.git # グローバルインストール(すべてのプロジェクトで利用可能) -cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/commands/ -cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/commands/ +cp CLI-Anything/opencode-commands/*.md ~/.config/opencode/command/ +cp CLI-Anything/cli-anything-plugin/HARNESS.md ~/.config/opencode/command/ # またはプロジェクトレベルのインストール -cp CLI-Anything/opencode-commands/*.md .opencode/commands/ -cp CLI-Anything/cli-anything-plugin/HARNESS.md .opencode/commands/ +cp CLI-Anything/opencode-commands/*.md .opencode/command/ +cp CLI-Anything/cli-anything-plugin/HARNESS.md .opencode/command/ ``` > **注:** `HARNESS.md`はすべてのコマンドが参照する方法論の仕様書です。コマンドと同じディレクトリに配置する必要があります。 @@ -206,6 +206,33 @@ bash CLI-Anything/qoder-plugin/setup-qodercli.sh
+

⚡ OpenClaw

+ +**ステップ1: スキルのインストール** + +CLI-Anything はネイティブな OpenClaw `SKILL.md` ファイルを提供しています。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 +``` + +**ステップ2: CLIの構築** + +インストール後、OpenClaw 内で以下のようにスキルを呼び出せます: + +`@cli-anything build a CLI for ./gimp` + +このスキルは Claude Code や OpenCode と同じ7段階の方法論に従っています。 + +
+ +
+

⚡ Codex 実験的 コミュニティ

**ステップ1: スキルのインストール** diff --git a/openclaw-skill/SKILL.md b/openclaw-skill/SKILL.md new file mode 100644 index 000000000..30051eb7f --- /dev/null +++ b/openclaw-skill/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cli-anything +description: Use when the user wants OpenClaw to build, refine, test, or validate a CLI-Anything harness for a GUI application or source repository. Adapts the CLI-Anything methodology to OpenClaw without changing the generated Python harness format. +--- + +# CLI-Anything for OpenClaw + +Use this skill when the user wants OpenClaw to act like the `CLI-Anything` builder. + +If this skill is being used from inside the `CLI-Anything` repository, read `../cli-anything-plugin/HARNESS.md` before implementation. That file is the full methodology source of truth. If it is not available, follow the condensed rules below. + +## Inputs + +Accept either: + +- A local source path such as `./gimp` or `/path/to/software` +- A GitHub repository URL + +Derive the software name from the local directory name after cloning if needed. + +## Modes + +### Build + +Use when the user wants a new harness. + +Produce this structure: + +```text +/ +└── agent-harness/ + ├── .md + ├── setup.py + └── cli_anything/ + └── / + ├── README.md + ├── __init__.py + ├── __main__.py + ├── _cli.py + ├── core/ + ├── utils/ + └── tests/ +``` + +Implement a stateful Click CLI with: + +- one-shot subcommands +- REPL mode as the default when no subcommand is given +- `--json` machine-readable output +- session state with undo/redo where the target software supports it + +### Refine + +Use when the harness already exists. + +First inventory current commands and tests, then do gap analysis against the target software. Prefer: + +- high-impact missing features +- easy wrappers around existing backend APIs or CLIs +- additions that compose well with existing commands + +Do not remove existing commands unless the user explicitly asks for a breaking change. + +### Test + +Plan tests before writing them. Keep both: + +- `test_core.py` for unit coverage +- `test_full_e2e.py` for workflow and backend validation + +When possible, test the installed command via subprocess using `cli-anything-` rather than only module imports. + +### Validate + +Check that the harness: + +- uses the `cli_anything.` namespace package layout +- has an installable `setup.py` entry point +- supports JSON output +- has a REPL default path +- documents usage and tests + +## Backend Rules + +Prefer the real software backend over reimplementation. Wrap the actual executable or scripting interface in `utils/_backend.py` when possible. Use synthetic reimplementation only when the project explicitly requires it or no viable native backend exists. + +## Packaging Rules + +- Use `find_namespace_packages(include=["cli_anything.*"])` +- Keep `cli_anything/` as a namespace package without a top-level `__init__.py` +- Expose `cli-anything-` through `console_scripts` + +## Workflow + +1. Acquire the source tree locally. +2. Analyze architecture, data model, existing CLIs, and GUI-to-API mappings. +3. Design command groups and state model. +4. Implement the harness. +5. Write `TEST.md`, then tests, then run them. +6. Update README usage docs. +7. Verify local installation with `pip install -e .` + +## Output Expectations + +When reporting progress or final results, include: + +- target software and source path +- files added or changed +- validation commands run +- open risks or backend limitations