复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-cli-anything-f230f4cbf196 ,按照其中的说明把「cli-anything」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Build a complete, stateful CLI harness for any GUI application.
Before doing anything else, you MUST read ./HARNESS.md. It defines the complete methodology, architecture standards, and implementation patterns. Every phase below follows HARNESS.md. Do not improvise — follow the harness specification.
/cli-anything <software-path-or-repo>
<software-path-or-repo> - Required. Either:
/home/user/gimp, ./blender)https://github.com/GNOME/gimp, github.com/blender/blender)If a GitHub URL is provided, the agent clones the repo locally first, then works on the local copy.
Note: Software names alone (e.g., "gimp") are NOT accepted. You must provide the actual source code path or repository URL so the agent can analyze the codebase.
This command implements the complete cli-anything methodology to build a production-ready CLI harness for any GUI application. All phases follow the standards defined in HARNESS.md.
<software-path-or-repo> is a GitHub URL, clone it to a local working directory/home/user/gimp -> gimp)agent-harness/cli_anything/<software>/core, utils, tests--json output mode for agent consumptioncli_anything.<software>.* namespaceTEST.md with comprehensive test plantest_core.py) - synthetic data, no external depstest_full_e2e.py) - real files, full pipelineTestCLISubprocess class with _resolve_cli("cli-anything-<software>")
that tests the installed command via subprocess (no hardcoded paths or CWD)pytest -v --tb=noTEST.mdskill_generator.pyskills/cli-anything-<software>/SKILL.md and refreshes the packaged compatibility copy at cli_anything/<software>/skills/SKILL.mdsetup.py with find_namespace_packages(include=["cli_anything.*"])cli-anything-<software>, namespace: cli_anything.<software>cli_anything/ has NO __init__.py (PEP 420 namespace package)pip install -e .which cli-anything-<software><software-name>/
└── agent-harness/
├── <SOFTWARE>.md # Software-specific SOP
├── setup.py # PyPI package config (find_namespace_packages)
└── cli_anything/ # Namespace package (NO __init__.py)
└── <software>/ # Sub-package (HAS __init__.py)
├── README.md # Installation and usage guide
├── <software>_cli.py # Main CLI entry point
├── core/ # Core modules
│ ├── project.py
│ ├── session.py
│ ├── export.py
│ └── ...
├── utils/ # Utilities
└── tests/
├── TEST.md # Test plan and results
├── test_core.py # Unit tests
└── test_full_e2e.py # E2E tests
Canonical repo-root skill output:
skills/
└── cli-anything-<software>/
└── SKILL.md
# Build a CLI for GIMP from local source
/cli-anything /home/user/gimp
# Build from a GitHub repo
/cli-anything https://github.com/blender/blender
Session-based CLIs must auto-save after one-shot mutations. Without this, one-shot commands silently lose changes because save_session() is never called before the process exits. A --dry-run flag must also be provided to suppress the save.
See guides/auto-save-dry-run.md for the full pattern, code examples, and when it applies.
The command succeeds when:
--json output mode works for all commands_resolve_cli() and pass with CLI_ANYTHING_FORCE_INSTALLED=1cli-anything-<software>--dry-run (see guide)