add dev setup, sync trigger scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 12:22:46 +01:00
parent f4560913c9
commit 35f558b323
2 changed files with 38 additions and 0 deletions

24
scripts/dev-setup.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
echo "=== Magnum Opus Development Setup ==="
for cmd in mbsync notmuch bun; do
if ! command -v "$cmd" &>/dev/null; then
echo "ERROR: $cmd is not installed."
echo " brew install isync notmuch bun"
exit 1
fi
done
echo "All dependencies found."
MAIL_DIR="${HOME}/Mail/magnumopus-dev"
mkdir -p "$MAIL_DIR"
echo ""
echo "Next steps:"
echo " 1. Configure your IMAP account in backend/.env"
echo " 2. Run: cd backend && bun run dev"
echo " 3. Open clients/macos/MagnumOpus.xcodeproj in Xcode"
echo " 4. Run: bash scripts/dev-sync.sh (to trigger first sync)"

14
scripts/dev-sync.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
API_URL="${API_URL:-http://localhost:3000}"
ACCOUNT_ID="${ACCOUNT_ID:-personal}"
CHANNEL_NAME="${CHANNEL_NAME:-personal}"
echo "Triggering sync..."
curl -s -X POST "${API_URL}/api/sync" \
-H "Content-Type: application/json" \
-d "{\"accountId\": \"${ACCOUNT_ID}\", \"channelName\": \"${CHANNEL_NAME}\"}"
echo ""
echo "Done."