From d253e048b9cdf2cf3e7a3d244c717c3f00e24b97 Mon Sep 17 00:00:00 2001 From: mithun50 Date: Tue, 15 Jul 2025 17:32:39 +0530 Subject: [PATCH] Added PyPI v3 setup and readme updates --- MANIFEST.in | 7 ++++ README.md | 20 ++++++++---- SuperClaude/Commands/__init__.py | 0 SuperClaude/Core/__init__.py | 0 SuperClaude/Hooks/__init__.py | 0 SuperClaude/__init__.py | 0 SuperClaude.py => SuperClaude/__main__.py | 22 +++++++------ config/__init__.py | 0 profiles/__init__.py | 0 pyproject.toml | 4 +++ setup.py | 40 +++++++++++++++++++++++ setup/operations/__init__.py | 2 +- setup/operations/backup.py | 12 +++---- setup/operations/install.py | 16 ++++----- setup/operations/uninstall.py | 10 +++--- setup/operations/update.py | 10 +++--- 16 files changed, 102 insertions(+), 41 deletions(-) create mode 100644 MANIFEST.in create mode 100644 SuperClaude/Commands/__init__.py create mode 100644 SuperClaude/Core/__init__.py create mode 100644 SuperClaude/Hooks/__init__.py create mode 100644 SuperClaude/__init__.py rename SuperClaude.py => SuperClaude/__main__.py (94%) mode change 100755 => 100644 create mode 100644 config/__init__.py create mode 100644 profiles/__init__.py create mode 100644 pyproject.toml create mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..3b0dbb0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +include VERSION +include README.md +include LICENSE +recursive-include setup * +recursive-include SuperClaude * +recursive-include config * +recursive-include profiles * diff --git a/README.md b/README.md index 48f478b..30f06a1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # SuperClaude v3 🚀 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![PyPI version](https://badge.fury.io/py/SuperClaude.svg)](https://pypi.org/project/SuperClaude/) + [![Version](https://img.shields.io/badge/version-3.0.0-blue.svg)](https://github.com/NomenAK/SuperClaude) [![GitHub issues](https://img.shields.io/github/issues/NomenAK/SuperClaude)](https://github.com/NomenAK/SuperClaude/issues) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/NomenAK/SuperClaude/blob/master/CONTRIBUTING.md) @@ -91,16 +93,22 @@ This is because v3 has a different structure and the old files can cause conflic ### Quick Start ```bash +pip install SuperClaude +#Install with python-pip +``` +### Install via Git +```bash # Clone the repo git clone https://github.com/NomenAK/SuperClaude.git cd SuperClaude # Install with our unified CLI -python3 SuperClaude.py install --quick +pip install . # That's it! 🎉 ``` + **Missing Python?** ```bash # Linux (Ubuntu/Debian) @@ -116,16 +124,16 @@ brew install python3 ### Other Installation Options ```bash # Minimal install (just core framework) -python3 SuperClaude.py install --minimal +python3 SuperClaude install --minimal # Developer setup (everything) -python3 SuperClaude.py install --profile developer +python3 SuperClaude install --profile developer # Interactive selection -python3 SuperClaude.py install +python3 SuperClaude install # See what's available -python3 SuperClaude.py install --list-components +python3 SuperClaude install --list-components ``` The installer handles everything: framework files, MCP servers, and Claude Code configuration. @@ -186,7 +194,7 @@ The codebase is pretty straightforward Python + documentation files. ``` SuperClaude/ -├── SuperClaude.py # Main installer CLI +├── setup.py # pypi setup file ├── SuperClaude/ # Framework files │ ├── Core/ # Behavior documentation (COMMANDS.md, FLAGS.md, etc.) │ ├── Commands/ # 16 slash command definitions diff --git a/SuperClaude/Commands/__init__.py b/SuperClaude/Commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/SuperClaude/Core/__init__.py b/SuperClaude/Core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/SuperClaude/Hooks/__init__.py b/SuperClaude/Hooks/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/SuperClaude/__init__.py b/SuperClaude/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/SuperClaude.py b/SuperClaude/__main__.py old mode 100755 new mode 100644 similarity index 94% rename from SuperClaude.py rename to SuperClaude/__main__.py index 45d32bc..485009f --- a/SuperClaude.py +++ b/SuperClaude/__main__.py @@ -4,11 +4,11 @@ SuperClaude Framework Management Hub Unified entry point for all SuperClaude operations Usage: - SuperClaude.py install [options] - SuperClaude.py update [options] - SuperClaude.py uninstall [options] - SuperClaude.py backup [options] - SuperClaude.py --help + SuperClaude install [options] + SuperClaude update [options] + SuperClaude uninstall [options] + SuperClaude backup [options] + SuperClaude --help """ import sys @@ -19,7 +19,8 @@ from pathlib import Path from typing import Dict, Callable # Add the 'setup' directory to the Python import path -setup_dir = Path(__file__).parent / "setup" +from pkg_resources import resource_filename +setup_dir = resource_filename('setup', '') sys.path.insert(0, str(setup_dir)) # Try to import utilities from the setup package @@ -77,9 +78,9 @@ def create_parser(): description="SuperClaude Framework Management Hub - Unified CLI", epilog=""" Examples: - SuperClaude.py install --dry-run - SuperClaude.py update --verbose - SuperClaude.py backup --create + SuperClaude install --dry-run + SuperClaude update --verbose + SuperClaude backup --create """, formatter_class=argparse.RawDescriptionHelpFormatter, parents=[global_parser] @@ -113,7 +114,7 @@ def setup_global_environment(args: argparse.Namespace): # Log startup context logger = get_logger() if logger: - logger.debug(f"SuperClaude.py called with operation: {getattr(args, 'operation', 'None')}") + logger.debug(f"SuperClaude called with operation: {getattr(args, 'operation', 'None')}") logger.debug(f"Arguments: {vars(args)}") @@ -239,3 +240,4 @@ def main() -> int: if __name__ == "__main__": sys.exit(main()) + diff --git a/config/__init__.py b/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/profiles/__init__.py b/profiles/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..3292c83 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..109872d --- /dev/null +++ b/setup.py @@ -0,0 +1,40 @@ +import setuptools + +with open("README.md", "r", encoding="utf-8") as fh: + long_description = fh.read() + +with open("VERSION", "r") as f: + version = f.read().strip() + +setuptools.setup( + name="SuperClaude", + version=version, + author="Mithun Gowda B, NomenAK", + author_email="contact@superclaude.dev", + description="SuperClaude Framework Management Hub", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/NomenAK/SuperClaude", + packages=setuptools.find_packages(), + include_package_data=True, + install_requires=["setuptools"], + entry_points={ + "console_scripts": [ + "SuperClaude=SuperClaude.__main__:main", + ], + }, + python_requires=">=3.6", + project_urls={ + "GitHub": "https://github.com/NomenAK/SuperClaude", + "Mithun Gowda B": "https://github.com/mithun50", + "NomenAK": "https://github.com/NomenAK", + "Bug Tracker": "https://github.com/NomenAK/SuperClaude/issues", + }, + classifiers=[ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "License :: OSI Approved :: MIT License", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + ], +) diff --git a/setup/operations/__init__.py b/setup/operations/__init__.py index 3356d58..589f3e0 100644 --- a/setup/operations/__init__.py +++ b/setup/operations/__init__.py @@ -2,7 +2,7 @@ SuperClaude Operations Module This module contains all SuperClaude management operations that can be -executed through the unified CLI hub (SuperClaude.py). +executed through the unified CLI hub (SuperClaude). Each operation module should implement: - register_parser(subparsers): Register CLI arguments for the operation diff --git a/setup/operations/backup.py b/setup/operations/backup.py index df35397..5230e92 100644 --- a/setup/operations/backup.py +++ b/setup/operations/backup.py @@ -40,12 +40,12 @@ def register_parser(subparsers, global_parser=None) -> argparse.ArgumentParser: description="Create, list, restore, and manage SuperClaude installation backups", epilog=""" Examples: - SuperClaude.py backup --create # Create new backup - SuperClaude.py backup --list --verbose # List available backups (verbose) - SuperClaude.py backup --restore # Interactive restore - SuperClaude.py backup --restore backup.tar.gz # Restore specific backup - SuperClaude.py backup --info backup.tar.gz # Show backup information - SuperClaude.py backup --cleanup --force # Clean up old backups (forced) + SuperClaude backup --create # Create new backup + SuperClaude backup --list --verbose # List available backups (verbose) + SuperClaude backup --restore # Interactive restore + SuperClaude backup --restore backup.tar.gz # Restore specific backup + SuperClaude backup --info backup.tar.gz # Show backup information + SuperClaude backup --cleanup --force # Clean up old backups (forced) """, formatter_class=argparse.RawDescriptionHelpFormatter, parents=parents diff --git a/setup/operations/install.py b/setup/operations/install.py index 51493f6..621e133 100644 --- a/setup/operations/install.py +++ b/setup/operations/install.py @@ -39,11 +39,11 @@ def register_parser(subparsers, global_parser=None) -> argparse.ArgumentParser: description="Install SuperClaude Framework with various options and profiles", epilog=""" Examples: - SuperClaude.py install # Interactive installation - SuperClaude.py install --quick --dry-run # Quick installation (dry-run) - SuperClaude.py install --profile developer # Developer profile - SuperClaude.py install --components core mcp # Specific components - SuperClaude.py install --verbose --force # Verbose with force mode + SuperClaude install # Interactive installation + SuperClaude install --quick --dry-run # Quick installation (dry-run) + SuperClaude install --profile developer # Developer profile + SuperClaude install --components core mcp # Specific components + SuperClaude install --verbose --force # Verbose with force mode """, formatter_class=argparse.RawDescriptionHelpFormatter, parents=parents @@ -121,7 +121,7 @@ def validate_system_requirements(validator: Validator, component_names: List[str # Provide additional guidance print(f"\n{Colors.CYAN}💡 Installation Help:{Colors.RESET}") - print(" Run 'SuperClaude.py install --diagnose' for detailed system diagnostics") + print(" Run 'SuperClaude install --diagnose' for detailed system diagnostics") print(" and step-by-step installation instructions.") return False @@ -321,12 +321,12 @@ def run_system_diagnostics(validator: Validator) -> None: print(f"\n{Colors.BLUE}Next steps:{Colors.RESET}") if all_passed: - print(" 1. Run 'SuperClaude.py install' to proceed with installation") + print(" 1. Run 'SuperClaude install' to proceed with installation") print(" 2. Choose your preferred installation mode (quick, minimal, or custom)") else: print(" 1. Install missing dependencies using the commands above") print(" 2. Restart your terminal after installing tools") - print(" 3. Run 'SuperClaude.py install --diagnose' again to verify") + print(" 3. Run 'SuperClaude install --diagnose' again to verify") def perform_installation(components: List[str], args: argparse.Namespace) -> bool: diff --git a/setup/operations/uninstall.py b/setup/operations/uninstall.py index b80d3ad..1417c91 100644 --- a/setup/operations/uninstall.py +++ b/setup/operations/uninstall.py @@ -38,10 +38,10 @@ def register_parser(subparsers, global_parser=None) -> argparse.ArgumentParser: description="Uninstall SuperClaude Framework components", epilog=""" Examples: - SuperClaude.py uninstall # Interactive uninstall - SuperClaude.py uninstall --components core # Remove specific components - SuperClaude.py uninstall --complete --force # Complete removal (forced) - SuperClaude.py uninstall --keep-backups # Keep backup files + SuperClaude uninstall # Interactive uninstall + SuperClaude uninstall --components core # Remove specific components + SuperClaude uninstall --complete --force # Complete removal (forced) + SuperClaude uninstall --keep-backups # Keep backup files """, formatter_class=argparse.RawDescriptionHelpFormatter, parents=parents @@ -484,7 +484,7 @@ def run(args: argparse.Namespace) -> int: print(f"\n{Colors.CYAN}Uninstall complete:{Colors.RESET}") print(f"SuperClaude has been removed from {args.install_dir}") if not args.complete: - print(f"You can reinstall anytime using 'SuperClaude.py install'") + print(f"You can reinstall anytime using 'SuperClaude install'") return 0 else: diff --git a/setup/operations/update.py b/setup/operations/update.py index 34df792..a8a68ca 100644 --- a/setup/operations/update.py +++ b/setup/operations/update.py @@ -40,10 +40,10 @@ def register_parser(subparsers, global_parser=None) -> argparse.ArgumentParser: description="Update SuperClaude Framework components to latest versions", epilog=""" Examples: - SuperClaude.py update # Interactive update - SuperClaude.py update --check --verbose # Check for updates (verbose) - SuperClaude.py update --components core mcp # Update specific components - SuperClaude.py update --backup --force # Create backup before update (forced) + SuperClaude update # Interactive update + SuperClaude update --check --verbose # Check for updates (verbose) + SuperClaude update --components core mcp # Update specific components + SuperClaude update --backup --force # Create backup before update (forced) """, formatter_class=argparse.RawDescriptionHelpFormatter, parents=parents @@ -354,7 +354,7 @@ def run(args: argparse.Namespace) -> int: # Check if SuperClaude is installed if not check_installation_exists(args.install_dir): logger.error(f"SuperClaude installation not found in {args.install_dir}") - logger.info("Use 'SuperClaude.py install' to install SuperClaude first") + logger.info("Use 'SuperClaude install' to install SuperClaude first") return 1 # Create component registry