FSI_FELON / install.sh
FerrellSyntheticIntelligence's picture
Upload install.sh with huggingface_hub
d3501a8 verified
Raw
History Blame Contribute Delete
4.99 kB
#!/usr/bin/env bash
# ═══════════════════════════════════════════════════════════════════
# FSI_FELON v4.0 — One-Command Install
# ═══════════════════════════════════════════════════════════════════
# Usage: curl -fsSL https://huggingface.co/FerrellSyntheticIntelligence/FSI_FELON/resolve/main/install.sh | bash
# ═══════════════════════════════════════════════════════════════════
set -e
RED='\033[0;31m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
BOLD='\033[1m'
NC='\033[0m'
echo -e "${CYAN}${BOLD}"
echo " ╔══════════════════════════════════════════════╗"
echo " ║ ⚡ FSI_FELON v4.0 INSTALLER ║"
echo " ║ Ferrell Synthetic Intelligence ║"
echo " ╚══════════════════════════════════════════════╝"
echo -e "${NC}"
# ── Detect OS ──
OS="$(uname -s)"
case "$OS" in
Linux*) INSTALL_DIR="${INSTALL_DIR:-$HOME/fsi_felon}" ;;
Darwin*) INSTALL_DIR="${INSTALL_DIR:-$HOME/fsi_felon}" ;;
MINGW*|MSYS*) INSTALL_DIR="${INSTALL_DIR:-$USERPROFILE/fsi_felon}" ;;
*)
echo -e "${RED}Unsupported OS: $OS${NC}"
exit 1
;;
esac
echo -e " ${CYAN}📍${NC} Installing to: ${BOLD}$INSTALL_DIR${NC}"
echo ""
# ── Check Python ──
PYTHON=""
for cmd in python3 python; do
if command -v "$cmd" &>/dev/null; then
VER=$("$cmd" --version 2>&1 | grep -oP '\d+\.\d+')
MAJOR="${VER%%.*}"
MINOR="${VER#*.}"
if [ "$MAJOR" -ge 3 ] && [ "$MINOR" -ge 10 ]; then
PYTHON="$cmd"
break
fi
fi
done
if [ -z "$PYTHON" ]; then
echo -e "${RED} ✗ Python 3.10+ required.${NC}"
echo -e " Install: sudo apt install python3 python3-pip (Linux)"
echo -e " brew install python (macOS)"
exit 1
fi
echo -e " ${GREEN}${NC} Python $("$PYTHON" --version)"
# ── Clone or Download ──
if [ -d "$INSTALL_DIR/.git" ]; then
echo -e " ${CYAN}${NC} Updating existing install..."
cd "$INSTALL_DIR" && git pull --ff-only 2>/dev/null || true
else
echo -e " ${CYAN}${NC} Downloading FSI_FELON..."
if command -v git &>/dev/null; then
git clone --depth 1 https://github.com/AnonymousNomad/FSI_FELON.git "$INSTALL_DIR" 2>/dev/null || {
echo -e " ${CYAN}${NC} Git failed, downloading archive..."
mkdir -p "$INSTALL_DIR"
curl -fsSL "https://github.com/AnonymousNomad/FSI_FELON/archive/refs/heads/master.tar.gz" | tar -xz --strip=1 -C "$INSTALL_DIR"
}
else
mkdir -p "$INSTALL_DIR"
curl -fsSL "https://github.com/AnonymousNomad/FSI_FELON/archive/refs/heads/master.tar.gz" | tar -xz --strip=1 -C "$INSTALL_DIR"
fi
fi
cd "$INSTALL_DIR"
# ── Install Dependencies ──
echo -e " ${CYAN}📦${NC} Installing Python dependencies..."
"$PYTHON" -m pip install --upgrade pip -q 2>/dev/null || true
"$PYTHON" -m pip install -r requirements.txt -q 2>/dev/null || {
echo -e " ${CYAN}📦${NC} Installing minimal deps..."
"$PYTHON" -m pip install numpy requests -q
}
echo -e " ${GREEN}${NC} Dependencies installed"
# ── Create Launch Script ──
cat > "$INSTALL_DIR/fsi_felon.sh" << 'SCRIPT'
#!/usr/bin/env bash
DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$DIR"
echo ""
echo " ⚡ FSI_FELON v4.0 — Starting IDE..."
echo " Open http://localhost:9090 in your browser"
echo ""
python3 ide/server.py
SCRIPT
chmod +x "$INSTALL_DIR/fsi_felon.sh"
echo ""
echo -e "${GREEN}${BOLD} ──────────────────────────────────────────────"
echo " ✓ FSI_FELON v4.0 INSTALLED SUCCESSFULLY"
echo " ──────────────────────────────────────────────${NC}"
echo ""
echo -e " ${CYAN}${NC} Start the IDE:"
echo " cd $INSTALL_DIR && bash fsi_felon.sh"
echo ""
echo -e " ${CYAN}${NC} Or run manually:"
echo " cd $INSTALL_DIR && python3 ide/server.py"
echo " → Open http://localhost:9090"
echo ""
echo -e " ${CYAN}${NC} Try the API:"
echo " cd $INSTALL_DIR && python3 api_demo.py"
echo ""
echo -e " ${CYAN}📖${NC} Full docs: https://github.com/AnonymousNomad/FSI_FELON"
echo -e " ${CYAN}💬${NC} Questions: ferrellsyntheticintelligence@proton.me"
echo ""
echo -e "${BOLD}Forever Twenty Four. ${NC}Ship or get out of the way."
echo ""