#!/bin/bash # So Many Crows: local test server. # Double-click to start. Close this window (or Ctrl-C) to stop. # # Controlled by default: # - offline mock crows (no API key used, no cost, no network calls) # - listens on this Mac only (127.0.0.1:8080) # - all state lives in this folder's .crows/ (delete it to start fresh) # From Terminal, `./start.command --real` uses real Claude crows (needs ANTHROPIC_API_KEY). cd "$(dirname "$0")" || exit 1 xattr -d com.apple.quarantine ./crows 2>/dev/null chmod +x ./crows if [ "$1" != "--real" ]; then unset ANTHROPIC_API_KEY echo "Controlled mode: offline mock crows." fi if lsof -iTCP:8080 -sTCP:LISTEN >/dev/null 2>&1; then echo "Something is already using port 8080. Stop it first." exit 1 fi (sleep 1; open "http://127.0.0.1:8080") & exec ./crows serve -addr 127.0.0.1:8080