#!/usr/bin/env bash set -euo pipefail echo "==========================================" echo " JimuAI Gemini CLI Setup (macOS)" echo "==========================================" echo echo "This script will:" echo "1. Check Node.js / npm" echo "2. Install Gemini CLI" echo "3. Write your JimuAI Gemini config" echo echo "[1/3] Checking environment..." curl -fsSL https://code.jimuxyz.com/env_deploy/gemini-install.sh | bash echo echo "[2/3] Installing Gemini CLI..." npm install -g @google/gemini-cli@latest echo read -r -p "Paste your Gemini API Key (sk-...) and press Enter: " JIMU_KEY if [ -z "${JIMU_KEY:-}" ]; then echo "[ERROR] API Key is required." exit 1 fi echo echo "[3/3] Writing Gemini config..." curl -fsSL https://code.jimuxyz.com/env_deploy/gemini-deploy.sh | bash -s -- "$JIMU_KEY" echo echo "Setup finished. Open a new terminal and run:" echo " gemini" echo read -r -p "Press Enter to close..."