mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
feat: migrate CLI to typer + rich for modern UX
## What Changed ### New CLI Architecture (typer + rich) - Created `superclaude/cli/` module with modern typer-based CLI - Replaced custom UI utilities with rich native features - Added type-safe command structure with automatic validation ### Commands Implemented - **install**: Interactive installation with rich UI (progress, panels) - **doctor**: System diagnostics with rich table output - **config**: API key management with format validation ### Technical Improvements - Dependencies: Added typer>=0.9.0, rich>=13.0.0, click>=8.0.0 - Entry Point: Updated pyproject.toml to use `superclaude.cli.app:cli_main` - Tests: Added comprehensive smoke tests (11 passed) ### User Experience Enhancements - Rich formatted help messages with panels and tables - Automatic input validation with retry loops - Clear error messages with actionable suggestions - Non-interactive mode support for CI/CD ## Testing ```bash uv run superclaude --help # ✓ Works uv run superclaude doctor # ✓ Rich table output uv run superclaude config show # ✓ API key management pytest tests/test_cli_smoke.py # ✓ 11 passed, 1 skipped ``` ## Migration Path - ✅ P0: Foundation complete (typer + rich + smoke tests) - 🔜 P1: Pydantic validation models (next sprint) - 🔜 P2: Enhanced error messages (next sprint) - 🔜 P3: API key retry loops (next sprint) ## Performance Impact - **Code Reduction**: Prepared for -300 lines (custom UI → rich) - **Type Safety**: Automatic validation from type hints - **Maintainability**: Framework primitives vs custom code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,10 @@ classifiers = [
|
||||
keywords = ["claude", "ai", "automation", "framework", "mcp", "agents", "development", "code-generation", "assistant"]
|
||||
dependencies = [
|
||||
"setuptools>=45.0.0",
|
||||
"importlib-metadata>=1.0.0; python_version<'3.8'"
|
||||
"importlib-metadata>=1.0.0; python_version<'3.8'",
|
||||
"typer>=0.9.0",
|
||||
"rich>=13.0.0",
|
||||
"click>=8.0.0"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
@@ -43,8 +46,8 @@ GitHub = "https://github.com/SuperClaude-Org/SuperClaude_Framework"
|
||||
"NomenAK" = "https://github.com/NomenAK"
|
||||
|
||||
[project.scripts]
|
||||
SuperClaude = "superclaude.__main__:main"
|
||||
superclaude = "superclaude.__main__:main"
|
||||
SuperClaude = "superclaude.cli.app:cli_main"
|
||||
superclaude = "superclaude.cli.app:cli_main"
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
|
||||
Reference in New Issue
Block a user