Merge pull request #193 from nsp/feat/continue-setup-without-api-keys

feat: Continue Python environment setup even without API keys
This commit is contained in:
Beehive Innovations
2025-08-07 23:29:50 -07:00
committed by GitHub

View File

@@ -1059,8 +1059,8 @@ migrate_env_file() {
echo " (Backup saved as .env.backup_*)" echo " (Backup saved as .env.backup_*)"
} }
# Validate API keys # Check API keys and warn if missing (non-blocking)
validate_api_keys() { check_api_keys() {
local has_key=false local has_key=false
local api_keys=( local api_keys=(
"GEMINI_API_KEY:your_gemini_api_key_here" "GEMINI_API_KEY:your_gemini_api_key_here"
@@ -1088,23 +1088,25 @@ validate_api_keys() {
fi fi
if [[ "$has_key" == false ]]; then if [[ "$has_key" == false ]]; then
print_error "No API keys found in .env!" print_warning "No API keys found in .env!"
echo "" >&2 echo ""
echo "Please edit .env and add at least one API key:" >&2 echo "The Python development environment will be set up, but you won't be able to use the MCP server until you add API keys."
echo " GEMINI_API_KEY=your-actual-key" >&2 echo ""
echo " OPENAI_API_KEY=your-actual-key" >&2 echo "To add API keys, edit .env and add at least one:"
echo " XAI_API_KEY=your-actual-key" >&2 echo " GEMINI_API_KEY=your-actual-key"
echo " DIAL_API_KEY=your-actual-key" >&2 echo " OPENAI_API_KEY=your-actual-key"
echo " OPENROUTER_API_KEY=your-actual-key" >&2 echo " XAI_API_KEY=your-actual-key"
echo "" >&2 echo " DIAL_API_KEY=your-actual-key"
print_info "After adding your API keys, run ./run-server.sh again" >&2 echo " OPENROUTER_API_KEY=your-actual-key"
echo "" >&2 echo ""
return 1 print_info "You can continue with development setup and add API keys later."
echo ""
fi fi
return 0 return 0 # Always return success to continue setup
} }
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Claude Integration Functions # Claude Integration Functions
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
@@ -1623,8 +1625,8 @@ main() {
set +a set +a
fi fi
# Step 4: Validate API keys # Step 4: Check API keys (non-blocking - just warn if missing)
validate_api_keys || exit 1 check_api_keys
# Step 5: Setup Python environment (uv-first approach) # Step 5: Setup Python environment (uv-first approach)
local python_cmd local python_cmd
@@ -1652,7 +1654,7 @@ main() {
echo "Logs will be written to: $script_dir/$LOG_DIR/$LOG_FILE" echo "Logs will be written to: $script_dir/$LOG_DIR/$LOG_FILE"
echo "" echo ""
# Step 11: Handle command line arguments # Step 12: Handle command line arguments
if [[ "$arg" == "-f" ]] || [[ "$arg" == "--follow" ]]; then if [[ "$arg" == "-f" ]] || [[ "$arg" == "--follow" ]]; then
follow_logs follow_logs
else else