#!/bin/bash # Claude Code Configuration Installer # Restores your Claude Code environment with agents, skills, and rules set -e # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color # Print functions print_header() { echo -e "${BLUE}======================================${NC}" echo -e "${BLUE}$1${NC}" echo -e "${BLUE}======================================${NC}" } print_step() { echo -e "${GREEN}[✓]${NC} $1" } print_info() { echo -e "${YELLOW}[i]${NC} $1" } # Get the script directory SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CLAUDE_DIR="$HOME/.claude" # Check if Claude Code is installed if ! command -v claude &> /dev/null; then echo -e "${RED}Error: Claude Code CLI not found!${NC}" echo "Please install Claude Code first: https://claude.ai/code" exit 1 fi print_header "Claude Code Configuration Installer" # Step 1: Backup existing configuration print_step "Backing up existing configuration..." if [ -d "$CLAUDE_DIR" ]; then BACKUP_DIR="$HOME/.claude.backup.$(date +%Y%m%d_%H%M%S)" cp -r "$CLAUDE_DIR" "$BACKUP_DIR" print_info "Backup created at: $BACKUP_DIR" fi # Step 2: Copy rules print_step "Installing coding rules and patterns..." mkdir -p "$CLAUDE_DIR/rules" cp -r "$SCRIPT_DIR/rules/"* "$CLAUDE_DIR/rules/" print_info "Rules installed to: $CLAUDE_DIR/rules" # Step 3: Install plugins via marketplace print_step "Installing plugins from marketplace..." # Function to install plugin from marketplace install_plugin() { local plugin_id="$1" print_info "Installing $plugin_id..." claude plugin install "$plugin_id" 2>/dev/null || echo " Warning: Failed to install $plugin_id" } # List of all plugins to install plugins=( "everything-claude-code@everything-claude-code" "voltagent-core-dev@voltagent-subagents" "voltagent-lang@voltagent-subagents" "voltagent-infra@voltagent-subagents" "voltagent-qa-sec@voltagent-subagents" "voltagent-data-ai@voltagent-subagents" "voltagent-dev-exp@voltagent-subagents" "voltagent-domains@voltagent-subagents" "voltagent-biz@voltagent-subagents" "voltagent-meta@voltagent-subagents" "voltagent-research@voltagent-subagents" "python-development@claude-code-workflows" "javascript-typescript@claude-code-workflows" "backend-development@claude-code-workflows" "kubernetes-operations@claude-code-workflows" "cloud-infrastructure@claude-code-workflows" "security-scanning@claude-code-workflows" "code-review-ai@claude-code-workflows" "full-stack-orchestration@claude-code-workflows" "conductor@claude-code-workflows" "agent-teams@claude-code-workflows" "document-skills@anthropic-agent-skills" "example-skills@anthropic-agent-skills" "swift-lsp@claude-plugins-official" ) # Install each plugin for plugin in "${plugins[@]}"; do install_plugin "$plugin" done # Step 4: Copy settings (optional, as template) if [ -f "$SCRIPT_DIR/settings.json.template" ]; then print_step "Settings template available..." print_info "To apply settings, copy: cp settings.json.template ~/.claude/settings.json" print_info "Then edit to your preferences" fi # Summary print_header "Installation Complete!" echo "" echo -e "${GREEN}Your Claude Code environment has been configured with:${NC}" echo " • Custom coding rules (Go, Git, Testing, Security)" echo " • 24 specialized plugins (agents, skills, workflows)" echo " • Voltagent subagents for comprehensive coverage" echo "" echo -e "${YELLOW}Next steps:${NC}" echo " 1. Restart Claude Code" echo " 2. Check available agents: /help" echo " 3. Check available skills: /skills" echo "" echo -e "${BLUE}Repository: https://gitea.cbcren.online/renato97/claude${NC}"