-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·59 lines (53 loc) · 1.55 KB
/
setup.sh
File metadata and controls
executable file
·59 lines (53 loc) · 1.55 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
51
52
53
54
55
56
57
58
59
#!/bin/bash
# LOG-mcp quick setup
# Run this after cloning the repo
set -e
echo "🔒 LOG-mcp Setup"
echo "================"
# Check for Docker
if command -v docker &> /dev/null; then
echo "✅ Docker found"
USE_DOCKER=true
else
echo "⚠️ Docker not found, will use Python"
USE_DOCKER=false
fi
# Copy env file
if [ ! -f docker/.env ]; then
cp docker/.env.example docker/.env
echo "✅ Created docker/.env — edit API key before starting"
fi
if [ "$USE_DOCKER" = true ]; then
# Check if .env has the default key
if grep -q "sk-your-api-key" docker/.env; then
echo ""
echo "⚠️ ACTION NEEDED: Edit docker/.env and set your LOG_API_KEY"
echo " nano docker/.env"
echo ""
echo "Then start with:"
echo " cd docker && docker compose up"
else
echo "✅ API key configured"
echo ""
echo "Start with:"
echo " cd docker && docker compose up"
echo ""
echo "Then open: http://localhost:8000"
fi
else
# Python install
echo "Installing Python dependencies..."
pip install -e ".[dev]" 2>/dev/null || pip install -r requirements.txt
echo "✅ Installed"
echo ""
echo "Set your API key:"
echo " export LOG_API_KEY=sk-your-key-here"
echo ""
echo "Start with:"
echo " uvicorn gateway.server:app --host 0.0.0.0 --port 8000"
echo ""
echo "Then open: http://localhost:8000"
fi
echo ""
echo "📚 Docs: docs/VISION.md, docs/PHASE2-PLAN.md"
echo "💬 Commands: /local /cloud /reason /compare /draft"