mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
**Problem:** - Old installation method required manual file copying or complex marketplace setup - Users had to run `/plugin marketplace add` + `/plugin install` (tedious) - No automated installation workflow **Solution:** - Add `make install-plugin` for one-command installation - Copies `.claude-plugin/` to `~/.claude/plugins/pm-agent/` - Add `make uninstall-plugin` and `make reinstall-plugin` - Update README.md with clear installation instructions **Changes:** Makefile: - Add install-plugin target: Copy plugin to ~/.claude/plugins/ - Add uninstall-plugin target: Remove plugin - Add reinstall-plugin target: Update existing installation - Update help menu with plugin management section README.md: - Replace complex marketplace instructions with `make install-plugin` - Add plugin management commands section - Update troubleshooting guide - Simplify migration guide from v1.x **Installation Flow:** ```bash git clone https://github.com/SuperClaude-Org/SuperClaude_Framework.git cd SuperClaude_Framework make install-plugin # Restart Claude Code → Plugin auto-activates ``` **Features:** - One-command install (no manual config) - Auto-activation via SessionStart hook - Hot reload support (TypeScript) - Clean uninstall/reinstall workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
154 lines
5.6 KiB
Makefile
154 lines
5.6 KiB
Makefile
.PHONY: dev install test test-plugin doctor verify clean lint format install-plugin uninstall-plugin reinstall-plugin help
|
|
|
|
# Development installation (local source, editable) - RECOMMENDED
|
|
dev:
|
|
@echo "🔧 Installing SuperClaude Framework (development mode)..."
|
|
uv pip install -e ".[dev]"
|
|
@echo ""
|
|
@echo "✅ Installation complete!"
|
|
@echo " Run 'make verify' to check installation"
|
|
|
|
# Alias for backward compatibility
|
|
install: dev
|
|
|
|
# Run tests
|
|
test:
|
|
@echo "Running tests..."
|
|
uv run pytest
|
|
|
|
# Test pytest plugin loading
|
|
test-plugin:
|
|
@echo "Testing pytest plugin auto-discovery..."
|
|
@uv run python -m pytest --trace-config 2>&1 | grep -A2 "registered third-party plugins:" | grep superclaude && echo "✅ Plugin loaded successfully" || echo "❌ Plugin not loaded"
|
|
|
|
# Run doctor command
|
|
doctor:
|
|
@echo "Running SuperClaude health check..."
|
|
@uv run superclaude doctor
|
|
|
|
# Verify Phase 1 installation
|
|
verify:
|
|
@echo "🔍 Phase 1 Installation Verification"
|
|
@echo "======================================"
|
|
@echo ""
|
|
@echo "1. Package location:"
|
|
@uv run python -c "import superclaude; print(f' {superclaude.__file__}')"
|
|
@echo ""
|
|
@echo "2. Package version:"
|
|
@uv run superclaude --version | sed 's/^/ /'
|
|
@echo ""
|
|
@echo "3. Pytest plugin:"
|
|
@uv run python -m pytest --trace-config 2>&1 | grep "registered third-party plugins:" -A2 | grep superclaude | sed 's/^/ /' && echo " ✅ Plugin loaded" || echo " ❌ Plugin not loaded"
|
|
@echo ""
|
|
@echo "4. Health check:"
|
|
@uv run superclaude doctor | grep "SuperClaude is healthy" > /dev/null && echo " ✅ All checks passed" || echo " ❌ Some checks failed"
|
|
@echo ""
|
|
@echo "======================================"
|
|
@echo "✅ Phase 1 verification complete"
|
|
|
|
# Linting
|
|
lint:
|
|
@echo "Running linter..."
|
|
uv run ruff check .
|
|
|
|
# Format code
|
|
format:
|
|
@echo "Formatting code..."
|
|
uv run ruff format .
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
@echo "Cleaning build artifacts..."
|
|
rm -rf build/ dist/ *.egg-info
|
|
find . -type d -name __pycache__ -exec rm -rf {} +
|
|
find . -type d -name .pytest_cache -exec rm -rf {} +
|
|
find . -type d -name .ruff_cache -exec rm -rf {} +
|
|
|
|
# Install Claude Code plugin
|
|
install-plugin:
|
|
@echo "🔌 Installing SuperClaude plugin to Claude Code..."
|
|
@if [ -d ~/.claude/plugins/pm-agent ]; then \
|
|
echo "⚠️ Plugin already exists at ~/.claude/plugins/pm-agent"; \
|
|
echo " Run 'make reinstall-plugin' to update"; \
|
|
exit 1; \
|
|
fi
|
|
@mkdir -p ~/.claude/plugins/pm-agent
|
|
@cp -r .claude-plugin/* ~/.claude/plugins/pm-agent/
|
|
@echo ""
|
|
@echo "✅ Plugin installed successfully!"
|
|
@echo ""
|
|
@echo "📋 Installed components:"
|
|
@echo " - PM Agent: Auto-activation orchestrator (SessionStart hook)"
|
|
@echo " - Research: Deep web search with adaptive planning"
|
|
@echo " - Index: Repository indexing (94% token reduction)"
|
|
@echo ""
|
|
@echo "🔄 Restart Claude Code or run /plugin to verify installation"
|
|
@echo " Available commands: /pm, /research, /index-repo"
|
|
|
|
# Uninstall Claude Code plugin
|
|
uninstall-plugin:
|
|
@echo "🗑️ Uninstalling SuperClaude plugin..."
|
|
@if [ ! -d ~/.claude/plugins/pm-agent ]; then \
|
|
echo "❌ Plugin not found at ~/.claude/plugins/pm-agent"; \
|
|
exit 1; \
|
|
fi
|
|
@rm -rf ~/.claude/plugins/pm-agent
|
|
@echo "✅ Plugin uninstalled successfully"
|
|
|
|
# Reinstall Claude Code plugin (uninstall + install)
|
|
reinstall-plugin:
|
|
@echo "🔄 Reinstalling SuperClaude plugin..."
|
|
@rm -rf ~/.claude/plugins/pm-agent 2>/dev/null || true
|
|
@mkdir -p ~/.claude/plugins/pm-agent
|
|
@cp -r .claude-plugin/* ~/.claude/plugins/pm-agent/
|
|
@echo "✅ Plugin reinstalled successfully"
|
|
@echo "🔄 Restart Claude Code to apply changes"
|
|
|
|
# Translate README to multiple languages using Neural CLI
|
|
translate:
|
|
@echo "🌐 Translating README using Neural CLI (Ollama + qwen2.5:3b)..."
|
|
@if [ ! -f ~/.local/bin/neural-cli ]; then \
|
|
echo "📦 Installing neural-cli..."; \
|
|
mkdir -p ~/.local/bin; \
|
|
ln -sf ~/github/neural/src-tauri/target/release/neural-cli ~/.local/bin/neural-cli; \
|
|
echo "✅ neural-cli installed to ~/.local/bin/"; \
|
|
fi
|
|
@echo ""
|
|
@echo "🇨🇳 Translating to Simplified Chinese..."
|
|
@~/.local/bin/neural-cli translate README.md --from English --to "Simplified Chinese" --output README-zh.md
|
|
@echo ""
|
|
@echo "🇯🇵 Translating to Japanese..."
|
|
@~/.local/bin/neural-cli translate README.md --from English --to Japanese --output README-ja.md
|
|
@echo ""
|
|
@echo "✅ Translation complete!"
|
|
@echo "📝 Files updated: README-zh.md, README-ja.md"
|
|
|
|
# Show help
|
|
help:
|
|
@echo "SuperClaude Framework - Available commands:"
|
|
@echo ""
|
|
@echo "🚀 Quick Start:"
|
|
@echo " make dev - Install in development mode (RECOMMENDED)"
|
|
@echo " make verify - Verify installation is working"
|
|
@echo " make install-plugin - Install plugin to Claude Code (~/.claude/plugins/)"
|
|
@echo ""
|
|
@echo "🔧 Development:"
|
|
@echo " make test - Run test suite"
|
|
@echo " make test-plugin - Test pytest plugin auto-discovery"
|
|
@echo " make doctor - Run health check"
|
|
@echo " make lint - Run linter (ruff check)"
|
|
@echo " make format - Format code (ruff format)"
|
|
@echo " make clean - Clean build artifacts"
|
|
@echo ""
|
|
@echo "🔌 Plugin Management:"
|
|
@echo " make install-plugin - Install plugin to Claude Code"
|
|
@echo " make uninstall-plugin - Remove plugin from Claude Code"
|
|
@echo " make reinstall-plugin - Update existing plugin installation"
|
|
@echo ""
|
|
@echo "📚 Documentation:"
|
|
@echo " make translate - Translate README to Chinese and Japanese"
|
|
@echo " make help - Show this help message"
|
|
@echo ""
|
|
@echo "💡 Legacy (backward compatibility):"
|
|
@echo " make install - Alias for 'make dev'"
|