forked from viperrcrypto/Siftly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·50 lines (41 loc) · 2.11 KB
/
start.sh
File metadata and controls
executable file
·50 lines (41 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -e
# ── Siftly Launcher ───────────────────────────────────────────────────────────
# Run this once to set up and start Siftly.
# After first run, just run it again to start the app.
# ─────────────────────────────────────────────────────────────────────────────
BLUE='\033[0;34m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
echo ""
echo -e "${BLUE} Siftly${NC}"
echo " AI-powered bookmark manager"
echo ""
# ── 1. Install dependencies if needed ─────────────────────────────────────────
if [ ! -d "node_modules" ]; then
echo " Installing dependencies..."
npm install
echo ""
fi
# ── 2. Set up database if needed ──────────────────────────────────────────────
if [ ! -f "prisma/dev.db" ]; then
echo " Setting up database..."
npx prisma generate
npx prisma migrate deploy 2>/dev/null || npx prisma db push
echo ""
fi
# ── 3. Check auth ─────────────────────────────────────────────────────────────
if command -v claude &>/dev/null; then
echo -e " ${GREEN}✓${NC} Claude CLI detected — AI features will use your subscription automatically"
else
echo -e " ${YELLOW}i${NC} Claude CLI not found. Add your API key in Settings after opening the app."
fi
echo ""
# ── 4. Open browser and start ─────────────────────────────────────────────────
echo " Starting on http://localhost:3000"
echo " Press Ctrl+C to stop"
echo ""
# Open browser after a short delay
(sleep 2 && open http://localhost:3000 2>/dev/null) &
npx next dev