-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: Add repo-local skill support + structure tests #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,85 @@ | ||||||||||||||||||||||
| # cli-anything Skill | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Build powerful, stateful CLI interfaces for any GUI application using the cli-anything harness methodology. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Overview | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| This skill enables AI agents to transform any software application into an agent-controllable CLI. It follows the proven cli-anything methodology that has successfully generated CLIs for GIMP, Blender, Inkscape, Audacity, LibreOffice, OBS Studio, and Kdenlive. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Usage | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| # Build CLI for local source | ||||||||||||||||||||||
| cli-anything /path/to/software | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Build CLI from GitHub | ||||||||||||||||||||||
| cli-anything https://github.com/org/repo | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Prerequisites | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - Python 3.10+ | ||||||||||||||||||||||
| - click >= 8.0 | ||||||||||||||||||||||
| - pytest | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Install dependencies: | ||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| pip install click pytest pyyaml | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Methodology | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| This skill follows the 7-phase cli-anything methodology: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Phase 0: Source Acquisition | ||||||||||||||||||||||
| - Clone GitHub repos or validate local paths | ||||||||||||||||||||||
| - Verify source code structure | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Phase 1: Codebase Analysis | ||||||||||||||||||||||
| - Analyze application architecture | ||||||||||||||||||||||
| - Map GUI actions to API calls | ||||||||||||||||||||||
| - Identify existing CLI tools | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Phase 2: CLI Architecture Design | ||||||||||||||||||||||
| - Design command groups matching app domains | ||||||||||||||||||||||
| - Plan state model and output formats | ||||||||||||||||||||||
| - Create software-specific SOP documents | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Phase 3: Implementation | ||||||||||||||||||||||
| - Create directory structure: `agent-harness/cli_anything/<software>/` | ||||||||||||||||||||||
| - Implement core modules with Click | ||||||||||||||||||||||
| - Add REPL support with JSON output mode | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Phase 4: Test Planning | ||||||||||||||||||||||
| - Design unit and E2E test coverage | ||||||||||||||||||||||
| - Plan validation scenarios | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Phase 5: Test Implementation | ||||||||||||||||||||||
| - Write comprehensive tests | ||||||||||||||||||||||
| - Ensure 100% pass rate | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Phase 6: Documentation & Publishing | ||||||||||||||||||||||
| - Document commands and usage | ||||||||||||||||||||||
| - Prepare for PyPI publishing | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Key Files | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | File | Purpose | | ||||||||||||||||||||||
| |------|---------| | ||||||||||||||||||||||
| | `HARNESS.md` | Complete methodology specification | | ||||||||||||||||||||||
| | `commands/cli-anything.md` | Main build command | | ||||||||||||||||||||||
| | `commands/validate.md` | Validation command | | ||||||||||||||||||||||
| | `commands/test.md` | Testing command | | ||||||||||||||||||||||
| | `commands/refine.md` | Refinement command | | ||||||||||||||||||||||
|
Comment on lines
+69
to
+73
|
||||||||||||||||||||||
| | `HARNESS.md` | Complete methodology specification | | |
| | `commands/cli-anything.md` | Main build command | | |
| | `commands/validate.md` | Validation command | | |
| | `commands/test.md` | Testing command | | |
| | `commands/refine.md` | Refinement command | | |
| | `cli-anything-plugin/HARNESS.md` | Complete methodology specification | | |
| | `cli-anything-plugin/commands/cli-anything.md` | Main build command | | |
| | `cli-anything-plugin/commands/validate.md` | Validation command | | |
| | `cli-anything-plugin/commands/test.md` | Testing command | | |
| | `cli-anything-plugin/commands/refine.md` | Refinement command | |
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The relative paths in this section don’t resolve from .agents/skills/cli-anything/ (e.g., ../cli-anything-plugin/ points to .agents/skills/cli-anything-plugin). Use repo-root-relative paths (like cli-anything-plugin/, blender/, etc.) or correct the relative traversal (e.g., ../../../cli-anything-plugin/).
| - Plugin workflow: See `../cli-anything-plugin/` for Claude Code plugin | |
| - Examples: See `../blender/`, `../gimp/`, `../audacity/` for implemented CLIs | |
| - Plugin workflow: See `cli-anything-plugin/` for Claude Code plugin | |
| - Examples: See `blender/`, `gimp/`, `audacity/` for implemented CLIs |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,87 @@ | ||||||||||||||
| """ | ||||||||||||||
| Test suite for CLI-Anything repo structure validation. | ||||||||||||||
|
|
||||||||||||||
| This test ensures the dual-entrypoint design (plugin + repo-local skill) | ||||||||||||||
| is properly documented and aligned with README claims. | ||||||||||||||
| """ | ||||||||||||||
|
|
||||||||||||||
| import os | ||||||||||||||
| import re | ||||||||||||||
|
Comment on lines
+8
to
+9
|
||||||||||||||
| import os | |
| import re |
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path.read_text() is called without an explicit encoding. To avoid platform-dependent decoding issues (especially on Windows), pass encoding="utf-8" (and optionally errors="strict") when reading README.md.
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These checks use .exists(), which would also pass if a file exists at this path. Since this test is validating repo structure, prefer .is_dir() for directories (and .is_file() for SKILL.md) so the assertions fail on the wrong filesystem type.
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path.read_text() is called without an explicit encoding. Consider using encoding="utf-8" here as well to make the test consistent and avoid locale-dependent failures.
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here, consider using .is_dir() for cli-anything-plugin/ and commands/ (and .is_file() for HARNESS.md) so the structure test catches incorrect file-vs-directory cases.
| assert plugin_dir.exists(), "cli-anything-plugin directory should exist" | |
| assert (plugin_dir / "HARNESS.md").exists(), "Plugin should have HARNESS.md" | |
| assert (plugin_dir / "commands").exists(), "Plugin should have commands directory" | |
| assert plugin_dir.is_dir(), "cli-anything-plugin directory should exist and be a directory" | |
| assert (plugin_dir / "HARNESS.md").is_file(), "Plugin should have HARNESS.md as a file" | |
| assert (plugin_dir / "commands").is_dir(), "Plugin should have commands directory" |
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test function name has a typo: test_example_appsocumented reads like it’s missing a word (e.g., apps_documented). Renaming will make failures/searching clearer.
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path.read_text() is called without an explicit encoding. Please specify encoding="utf-8" when reading README.md to prevent failures on systems where the default encoding isn't UTF-8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prerequisites list omits
pyyaml, but the install command below includes it (pip install ... pyyaml). Please make these consistent by either listingpyyamlas a prerequisite or removing it from the install command.