#!/bin/bash # Exit immediately if a command exits with a non-zero status set -e echo "==================================================" echo "šŸš€ INITIALIZING A.L.A.P.A. DEPLOYMENT SEQUENCE šŸš€" echo "==================================================" # 1. Install Homebrew Dependencies echo -e "\n[STEP 1] Installing core security binaries via Homebrew..." brew install projectdiscovery/tap/katana brew install projectdiscovery/tap/nuclei brew install ollama # Update nuclei templates just to be safe echo "Updating Nuclei vulnerability templates..." nuclei -update-templates # 2. Run the Ollama Server echo -e "\n[STEP 2] Igniting Ollama local AI daemon..." brew services start ollama sleep 5 # Give the daemon 5 seconds to fully wake up and bind to the port # 3. Pull the Local LLM echo -e "\n[STEP 3] Pulling Qwen 3.5 9B. (This may take a moment depending on your internet speed)..." ollama pull qwen3.5:9b # 4. Clone or Update the GitHub Repository echo -e "\n[STEP 4] Fetching A.L.A.P.A. codebase from GitHub..." if [ -d "ALAPA-Agent" ]; then echo "Directory 'ALAPA-Agent' already exists. Pulling latest updates..." cd ALAPA-Agent git pull else echo "Cloning repository from https://github.com/lxrxvci/ALAPA-Agent..." git clone https://github.com/lxrxvci/ALAPA-Agent cd ALAPA-Agent fi # 5. Build the Virtual Environment echo -e "\n[STEP 5] Forging isolated Python virtual environment..." python3 -m venv venv source venv/bin/activate # 6. Install Python Dependencies echo -e "\n[STEP 6] Injecting Python dependencies..." python3 -m pip install --upgrade pip python3 -m pip install requests echo -e "\n==================================================" echo "āœ… INFRASTRUCTURE BUILT. ENVIRONMENT SECURED." echo "==================================================" # 7. Launch Verification if [ -f "master_agent.py" ]; then echo -e "\nšŸ”„ LAUNCHING A.L.A.P.A. šŸ”„\n" python master_agent.py else echo -e "\nāŒ CRITICAL ERROR: master_agent.py not found!" echo "The repository cloned successfully, but the main script is missing." echo "Please check your GitHub repository to ensure the files were pushed correctly." fi