#!/usr/bin/env sh # Bootstrap installer for ClaudeMailbox on macOS / Linux. # # Usage: # curl -fsSL https://git.kuns.dev/releases/ClaudeMailbox/raw/branch/main/install.sh | sh # # Env vars: # NO_AUTOSTART=1 skip install-autostart set -eu if ! command -v npm >/dev/null 2>&1; then echo "error: Node.js / npm not found on PATH. Install Node 20+ from https://nodejs.org and retry." >&2 exit 1 fi echo "Configuring @kuns scoped npm registry..." npm config set "@kuns:registry" "https://git.kuns.dev/api/packages/releases/npm/" echo "Installing @kuns/claude-mailbox globally..." npm install -g "@kuns/claude-mailbox" if [ -z "${NO_AUTOSTART:-}" ]; then echo "Registering autostart..." claude-mailbox install-autostart fi echo "" echo "ClaudeMailbox installed. Run 'claude-mailbox status' to verify."