-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_setup.sh
More file actions
executable file
·113 lines (101 loc) · 2.95 KB
/
test_setup.sh
File metadata and controls
executable file
·113 lines (101 loc) · 2.95 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/bash
# Quick setup test script for CodeGuard AI
echo "🛡️ CodeGuard AI - Setup Test Script"
echo "======================================"
echo ""
# Check Python version
echo "1. Checking Python version..."
python_version=$(python --version 2>&1)
echo " ✓ $python_version"
echo ""
# Check Docker
echo "2. Checking Docker..."
if command -v docker &> /dev/null; then
docker_version=$(docker --version)
echo " ✓ $docker_version"
else
echo " ✗ Docker not found. Please install Docker."
exit 1
fi
echo ""
# Check Docker Compose
echo "3. Checking Docker Compose..."
if command -v docker-compose &> /dev/null; then
compose_version=$(docker-compose --version)
echo " ✓ $compose_version"
else
echo " ✗ Docker Compose not found. Please install Docker Compose."
exit 1
fi
echo ""
# Check config.json
echo "4. Checking configuration..."
if [ -f "config.json" ]; then
echo " ✓ config.json found"
# Check for E2B API key
if grep -q "e2b_api_key" config.json; then
echo " ✓ E2B API key configured"
else
echo " ⚠ E2B API key not found in config.json"
fi
# Check for GitHub token
if grep -q "github_token" config.json; then
echo " ✓ GitHub token configured"
else
echo " ⚠ GitHub token not found in config.json"
fi
else
echo " ✗ config.json not found"
echo " → Please create config.json with your API keys"
echo ""
echo " Example config.json:"
echo " {"
echo " \"e2b_api_key\": \"your_e2b_key\","
echo " \"github_token\": \"your_github_token\""
echo " }"
exit 1
fi
echo ""
# Check Python dependencies
echo "5. Checking Python dependencies..."
if python -c "import streamlit" 2>/dev/null; then
echo " ✓ streamlit installed"
else
echo " ✗ streamlit not installed"
echo " → Run: pip install -r requirements.txt"
exit 1
fi
if python -c "import e2b_code_interpreter" 2>/dev/null; then
echo " ✓ e2b-code-interpreter installed"
else
echo " ✗ e2b-code-interpreter not installed"
echo " → Run: pip install -r requirements.txt"
exit 1
fi
if python -c "import httpx" 2>/dev/null; then
echo " ✓ httpx installed"
else
echo " ✗ httpx not installed"
echo " → Run: pip install -r requirements.txt"
exit 1
fi
echo ""
# Check GitHub MCP server
echo "6. Checking GitHub MCP Server..."
if docker ps | grep -q "codeguard-github-mcp"; then
echo " ✓ GitHub MCP server is running"
else
echo " ⚠ GitHub MCP server not running"
echo " → Run: docker-compose up -d"
fi
echo ""
echo "======================================"
echo "✅ Setup check complete!"
echo ""
echo "Next steps:"
echo " 1. If any items are marked with ✗, fix them first"
echo " 2. Start GitHub MCP server: docker-compose up -d"
echo " 3. Launch dashboard: streamlit run dashboard.py"
echo " 4. Open http://localhost:8501"
echo ""
echo "Happy hacking! 🚀"