-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
97 lines (83 loc) · 2.85 KB
/
setup.sh
File metadata and controls
97 lines (83 loc) · 2.85 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
#!/bin/bash
# ============================================================
# OMC Visual — Setup Script
# Run this in your project directory on the server
# ============================================================
set -e
echo ""
echo "╔══════════════════════════════════════════╗"
echo "║ OMC Visual — Setup v0.1.0 ║"
echo "╚══════════════════════════════════════════╝"
echo ""
# Check Node.js
if ! command -v node &>/dev/null; then
echo "❌ Node.js is required but not installed."
echo " Install: sudo apt install -y nodejs npm"
exit 1
fi
NODE_VERSION=$(node --version | sed 's/v//' | cut -d. -f1)
if [ "$NODE_VERSION" -lt 20 ]; then
echo "❌ Node.js 20+ required, found $(node --version)"
exit 1
fi
echo "✅ Node.js $(node --version)"
# Check npm
if ! command -v npm &>/dev/null; then
echo "❌ npm is required but not installed."
exit 1
fi
echo "✅ npm $(npm --version)"
# Check tmux
if ! command -v tmux &>/dev/null; then
echo "⚠️ tmux not found. Installing..."
sudo apt install -y tmux
fi
echo "✅ tmux $(tmux -V)"
# Check Claude Code
if command -v claude &>/dev/null; then
echo "✅ Claude Code $(claude --version 2>/dev/null | head -1)"
else
echo "⚠️ Claude Code CLI not found (optional for development)"
fi
# Check OMC
if command -v omc &>/dev/null; then
echo "✅ oh-my-claudecode $(omc --version 2>/dev/null | head -1)"
else
echo "⚠️ oh-my-claudecode not found (optional for development)"
fi
echo ""
echo "--- Installing dependencies ---"
echo ""
# Install root dependencies
echo "📦 Root dependencies..."
npm install
# Install server dependencies
echo "📦 Server dependencies..."
cd server
npm install
cd ..
# Install frontend dependencies
echo "📦 Frontend dependencies..."
cd frontend
npm install
cd ..
echo ""
echo "--- Build frontend ---"
echo ""
cd frontend
npm run build
cd ..
echo ""
echo "╔══════════════════════════════════════════╗"
echo "║ Setup Complete! ║"
echo "║ ║"
echo "║ Start the server: ║"
echo "║ npm start ║"
echo "║ ║"
echo "║ Or development mode (hot reload): ║"
echo "║ npm run dev ║"
echo "║ ║"
echo "║ Then open in your browser: ║"
echo "║ http://YOUR_SERVER_IP:3200 ║"
echo "╚══════════════════════════════════════════╝"
echo ""