#!/usr/bin/env bash # Install Playwright + Chromium for icloud-note under ~/.config/icloud-notes set -euo pipefail REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" CONFIG_DIR="${ICLOUD_NOTES_CONFIG:-$HOME/.config/icloud-notes}" SKILL_SCRIPT="$REPO_ROOT/scripts/icloud-note.mjs" BIN="$HOME/.local/bin/icloud-note" AGENTS_SKILL="$HOME/.agents/skills/iphone-icloud-notes" CURSOR_SKILL="$HOME/.cursor/skills/iphone-icloud-notes" mkdir -p "$CONFIG_DIR" "$HOME/.local/bin" "$HOME/.agents/skills" "$HOME/.cursor/skills" chmod 700 "$CONFIG_DIR" cd "$CONFIG_DIR" if [[ ! -f package.json ]]; then npm init -y >/dev/null fi npm install playwright@latest npx playwright install chromium cat > "$BIN" < $REPO_ROOT" echo "Next: icloud-note login"