-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·75 lines (67 loc) · 2.82 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·75 lines (67 loc) · 2.82 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
#!/usr/bin/env bash
# ─────────────────────────────────────────────────────────────────────────────
# ACODA FACTORY — One-command installer
# https://github.com/leoailabs/greyhack-factory
# ─────────────────────────────────────────────────────────────────────────────
set -euo pipefail
REPO="https://github.com/leoailabs/greyhack-factory"
DIR="greyhack-factory"
echo ""
echo " 🏭 ACODA FACTORY"
echo " Self-hosted AI software factory"
echo " ─────────────────────────────────"
echo ""
# Check dependencies
for cmd in docker git curl; do
if ! command -v "$cmd" &>/dev/null; then
echo " ❌ Missing: $cmd — please install it first"
exit 1
fi
done
if ! docker compose version &>/dev/null 2>&1; then
echo " ❌ Docker Compose v2 not found — please install Docker Desktop or docker-compose-plugin"
exit 1
fi
echo " ✅ Dependencies OK"
# Clone
if [ -d "$DIR" ]; then
echo " 📁 Directory '$DIR' already exists — pulling latest..."
cd "$DIR" && git pull && cd ..
else
echo " 📦 Cloning repository..."
git clone "$REPO" "$DIR"
fi
cd "$DIR"
# Setup .env
if [ ! -f ".env" ]; then
cp .env.example .env
echo ""
echo " ⚙️ Config file created: .env"
echo ""
echo " ┌─────────────────────────────────────────────────┐"
echo " │ Edit .env before starting: │"
echo " │ │"
echo " │ GITHUB_TOKEN → github.com/settings/tokens│"
echo " │ ORCHESTRATOR_API_KEY → console.anthropic.com │"
echo " │ CODER_API_KEY → platform.deepseek.com │"
echo " └─────────────────────────────────────────────────┘"
echo ""
echo " Then run: docker compose up -d"
echo ""
else
echo " ✅ .env already configured"
echo ""
echo " Starting factory..."
docker compose up -d
echo ""
echo " ✅ Factory running!"
echo ""
echo " API: http://localhost:3020"
echo " Temporal UI: http://localhost:8233"
echo " Pool status: http://localhost:3200/health"
echo ""
echo " Submit a job:"
echo " curl -X POST http://localhost:3020/api/forge/jobs \\"
echo " -H 'Content-Type: application/json' \\"
echo " -d '{\"repoUrl\":\"https://github.com/you/repo\",\"taskDescription\":\"Add dark mode\"}'"
fi