#!/usr/bin/env bash # FreeApply installer for macOS and Linux (Claude Code, Cursor, VS Code, Windsurf; Claude Desktop gets the .mcpb). # Run: curl -fsSL https://www.mybotsai.com/appserver/install.sh | bash # It checks for Node.js, then downloads and runs install.mjs, which verifies the signed package before installing it. # Read install.mjs first if you like: https://www.mybotsai.com/appserver/install.mjs set -euo pipefail base="https://www.mybotsai.com/appserver" if ! command -v node >/dev/null 2>&1; then echo "FreeApply needs Node.js 22.13 or newer for Claude Code, Cursor, VS Code and Windsurf." echo "Install it from https://nodejs.org (macOS with Homebrew: brew install node), then run this again." echo "Using Claude Desktop only? You don't need Node: download $base/freeapply.mcpb and double-click it." exit 1 fi if ! node -e 'const [a,b]=process.versions.node.split(".").map(Number);process.exit(a>22||(a===22&&b>=13)?0:1)'; then echo "FreeApply needs Node.js 22.13 or newer (you have $(node -v)). Update it from https://nodejs.org" exit 1 fi tmp=$(mktemp "${TMPDIR:-/tmp}/freeapply-install.XXXXXX") trap 'rm -f "$tmp"' EXIT curl -fsSL "$base/install.mjs" -o "$tmp" # The installer asks before changing each app; it reads answers from the terminal, not from this pipe. if [ -r /dev/tty ]; then node "$tmp" "$@"