#!/usr/bin/env bash # Faceless Video Editor - installer for macOS / Linux # Run: curl -fsSL https://skill.thefalconmotion.com/install.sh | bash # Optional: FM_KEY=fsk_... to skip the prompt. set -euo pipefail BASE="https://skill.thefalconmotion.com" g() { printf '\033[32m%s\033[0m\n' "$*"; }; r() { printf '\033[31m%s\033[0m\n' "$*"; }; y() { printf '\033[33m%s\033[0m\n' "$*"; } echo; echo " Faceless Video Editor - The Falcon Motion"; echo KEY="${FM_KEY:-}" if [ -z "$KEY" ]; then printf ' Paste your access key (fsk_...): '; read -r KEY /dev/null || true)" if [ -z "$ACC" ]; then r " Key not found. Copy the whole key and try again."; exit 1; fi case "$ACC" in *'"status":"active"'*) g " OK";; *) r " This key is not active. Check $BASE/account"; exit 1;; esac echo " [2/4] Checking the tools on this computer..." miss=0 for t in claude node ffmpeg python3; do if ! command -v "$t" >/dev/null 2>&1; then y " missing: $t"; miss=1; fi done if [ "$miss" = 1 ]; then y " Install: Claude Code (claude.com/claude-code), Node 20+ (nodejs.org), ffmpeg (brew install ffmpeg), Python 3.11+" exit 1 fi [ "$(node -v | sed 's/^v\([0-9]*\).*/\1/')" -ge 20 ] || { y " Node.js is too old. Install Node 20 or newer."; exit 1; } g " OK" echo " [3/4] Connecting Claude Code to the skill..." claude mcp remove faceless --scope user >/dev/null 2>&1 || true claude mcp add --transport http --scope user faceless "$BASE/mcp" --header "Authorization: Bearer $KEY" >/dev/null \ || { r " Could not register with Claude Code. Run 'claude' once to sign in, then try again."; exit 1; } g " OK" echo " [4/4] Installing the skill..." mkdir -p "$HOME/.claude/skills/faceless-video-editor" curl -fsSL "$BASE/SKILL.md" -o "$HOME/.claude/skills/faceless-video-editor/SKILL.md" g " OK" echo; echo " All set. Make an empty folder, run 'claude' in it and ask, for example:" echo ' "Make a 60 second vertical Short about the sinking of the Titanic."'; echo; echo " Guide: $BASE/docs"