LetsTryGPT/agent4-implementation
0
1#!/bin/bash2 3# Agent4 Multi-LLM - GitHub Secrets Setup Script4# This script helps you add all required secrets to GitHub5 6set -e7 8echo "๐ Agent4 Multi-LLM - GitHub Secrets Setup"9echo "=========================================="10echo ""11 12# Check if GitHub CLI is installed13if ! command -v gh &> /dev/null; then14 echo "โ GitHub CLI (gh) is not installed."15 echo ""16 echo "Install it with:"17 echo " macOS: brew install gh"18 echo " Linux: See https://github.com/cli/cli/blob/trunk/docs/install_linux.md"19 echo ""20 exit 121fi22 23# Check if logged in24if ! gh auth status &> /dev/null; then25 echo "๐ Not logged in to GitHub. Logging in..."26 gh auth login27fi28 29echo "โ
GitHub CLI is ready"30echo ""31 32# Function to add secret33add_secret() {34 local secret_name=$135 local secret_description=$236 37 echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"38 echo "Adding: $secret_name"39 echo "Description: $secret_description"40 echo ""41 read -sp "Enter value for $secret_name (input hidden): " secret_value42 echo ""43 44 if [ -z "$secret_value" ]; then45 echo "โ ๏ธ Skipped (empty value)"46 echo ""47 return48 fi49 50 if gh secret set "$secret_name" --body "$secret_value" --repo NovusAevum/agent4-implementation; then51 echo "โ
Successfully added $secret_name"52 else53 echo "โ Failed to add $secret_name"54 fi55 echo ""56}57 58echo "๐ Required Secrets for Agent4 Multi-LLM"59echo ""60echo "You'll be prompted to enter each API key."61echo "Press Enter to skip any optional keys."62echo ""63read -p "Press Enter to continue..."64echo ""65 66# Required secrets67echo "๐ REQUIRED SECRETS"68echo "==================="69echo ""70 71add_secret "HF_TOKEN" "Hugging Face API Token (get from https://huggingface.co/settings/tokens)"72add_secret "MISTRAL_API_KEY" "Mistral AI API Key (get from https://console.mistral.ai/)"73add_secret "DEEPSEEK_API_KEY" "DeepSeek API Key (get from https://platform.deepseek.com/)"74add_secret "OPENROUTER_API_KEY" "OpenRouter API Key (get from https://openrouter.ai/keys)"75add_secret "CODESTRAL_API_KEY" "Codestral API Key (get from https://console.mistral.ai/)"76 77# Optional secrets78echo ""79echo "๐ OPTIONAL SECRETS"80echo "==================="81echo ""82echo "These are optional. Press Enter to skip if you don't have them."83echo ""84 85read -p "Do you want to add optional provider keys? (y/N): " add_optional86echo ""87 88if [[ "$add_optional" =~ ^[Yy]$ ]]; then89 add_secret "ALIBABA_QWEN_API_KEY" "Alibaba Qwen API Key (optional)"90 add_secret "KIMI_API_KEY" "Kimi API Key (optional)"91 add_secret "CONTINUE_API_KEY" "Continue.dev API Key (optional)"92fi93 94echo ""95echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"96echo "โ
Secret setup complete!"97echo ""98 99# List all secrets100echo "๐ Current secrets in repository:"101echo ""102gh secret list --repo NovusAevum/agent4-implementation103 104echo ""105echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"106echo "๐ Next Steps:"107echo ""108echo "1. Verify secrets are added above"109echo "2. Trigger the CI/CD pipeline:"110echo " cd /Users/wmh/CascadeProjects/agent4-implementation"111echo " git push origin main"112echo ""113echo "3. Monitor the deployment:"114echo " gh run watch"115echo ""116echo "4. View your deployed Space:"117echo " https://huggingface.co/spaces/NovusAevum/agent4-implementation"118echo ""119echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"120 