7-Phase Methodology
7-Phase Methodology
Section titled “7-Phase Methodology”CLI-Anything uses a proven 7-phase methodology to generate production-ready CLIs.
Overview
Section titled “Overview”| Phase | Name | Focus |
|---|---|---|
| 1 | Analyze | Understand the software |
| 2 | Design | Plan the CLI architecture |
| 3 | Implement | Build the CLI |
| 4 | Plan Tests | Create test strategy |
| 5 | Write Tests | Implement test suite |
| 6 | Document | Write documentation |
| 7 | Publish | Package and distribute |
Phase 1: Analyze
Section titled “Phase 1: Analyze”Goal: Understand the target software inside and out.
Activities
Section titled “Activities”- Read documentation and source code
- Identify key features and capabilities
- Map GUI actions to command equivalents
- Analyze input/output formats
Outputs
Section titled “Outputs”- Feature inventory
- Capability matrix
- Action mapping table
Phase 2: Design
Section titled “Phase 2: Design”Goal: Architect a clean, intuitive CLI.
Activities
Section titled “Activities”- Define command groups
- Design state model
- Choose output formats (text, JSON)
- Plan error handling
Outputs
Section titled “Outputs”- Command hierarchy
- State model diagram
- API specification
Phase 3: Implement
Section titled “Phase 3: Implement”Goal: Build the working CLI.
Activities
Section titled “Activities”- Create Click CLI framework
- Implement all commands
- Add REPL interface
- Support JSON output mode
- Implement undo/redo
Key Features
Section titled “Key Features”- Click framework for robust CLI
- REPL for interactive use
- JSON mode for AI agents
- Undo/redo for safety
Phase 4: Plan Tests
Section titled “Phase 4: Plan Tests”Goal: Define comprehensive test strategy.
Activities
Section titled “Activities”- Identify test scenarios
- Design unit tests
- Design E2E tests
- Set coverage targets
Outputs
Section titled “Outputs”- Test plan document
- Coverage requirements (≥80%)
Phase 5: Write Tests
Section titled “Phase 5: Write Tests”Goal: Implement the test suite.
Activities
Section titled “Activities”- Write unit tests
- Write integration tests
- Write E2E tests
- Run and verify
Coverage Requirements
Section titled “Coverage Requirements”| Type | Minimum |
|---|---|
| Unit Tests | 20+ |
| E2E Tests | 5+ |
| Coverage | 80%+ |
Phase 6: Document
Section titled “Phase 6: Document”Goal: Create comprehensive documentation.
Activities
Section titled “Activities”- Write README with examples
- Create SKILL.md for AI discovery
- Document all commands
- Add troubleshooting guide
Key Files
Section titled “Key Files”README.md- User documentationSKILL.md- AI-discoverable skill definitionTEST.md- Test documentation
Phase 7: Publish
Section titled “Phase 7: Publish”Goal: Package and distribute the CLI.
Activities
Section titled “Activities”- Create setup.py
- Register with CLI-Hub
- Publish to registry
- Add to documentation site
Distribution
Section titled “Distribution”# Install from CLI-Hubcli-hub install <name>
# Or from sourcepip install cli-anything-<name>Quality Gates
Section titled “Quality Gates”Each phase has quality gates:
| Phase | Gate |
|---|---|
| 1 | Feature inventory complete |
| 2 | Design reviewed |
| 3 | All commands implemented |
| 4 | Test plan approved |
| 5 | All tests passing |
| 6 | Docs complete |
| 7 | Published to registry |
Why This Works
Section titled “Why This Works”- Systematic - No steps are skipped
- Tested - Comprehensive test coverage
- Documented - Clear documentation for users and AI
- Proven - Used to generate 40+ production CLIs
Next Steps
Section titled “Next Steps”- CLI-Hub Guide - Browse available CLIs
- Getting Started - Start using CLIs
- Tutorials - Learn with examples