Skip to content

Your team of AI agents, on your Mac, Windows or Linux. Agents that talk in channels, write code, review each other and use your tools, on the Claude Code, Codex, OpenCode or Pi you already have. Anything that touches the real world waits for your yes.

1.1 KB
Raw Blame
#!/bin/sh
# Installs the built app in /Applications. Copying over a running app leaves
# it unable to quit normally, so it is closed first (after its replies end).
# An old agent-desk.app (the app's first name) is closed and removed.
set -e
APP=/Applications/Tucano.app
OLD=/Applications/agent-desk.app
BUILT="$HOME/Library/Caches/tucano/dist/mac-arm64/Tucano.app"
running() { pgrep -f "$APP/Contents/MacOS/Tucano\$" >/dev/null || pgrep -f "$OLD/Contents/MacOS/agent-desk\$" >/dev/null; }
if running; then
  echo "Closing the running app…"
  for name in Tucano agent-desk; do
    osascript -e 'with timeout of 20 seconds' -e "tell application \"$name\" to quit" -e 'end timeout' >/dev/null 2>&1 || true
  done
  for _ in $(seq 1 30); do running || break; sleep 1; done
  if running; then echo "The app did not close. Quit it with ⌘Q and run this again." >&2; exit 1; fi
fi
ditto "$BUILT" "$APP"
if [ -d "$OLD" ]; then
  rm -rf "$OLD"
  osascript -e 'tell application "System Events" to delete login item "agent-desk"' >/dev/null 2>&1 || true
  echo "Removed the old agent-desk.app."
fi
echo "Instalado em $APP"