-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·147 lines (123 loc) · 3.93 KB
/
install.sh
File metadata and controls
executable file
·147 lines (123 loc) · 3.93 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/usr/bin/env bash
# Sibyl Installer
# Usage: curl -fsSL https://sibyl.dev/install.sh | sh
#
# This script:
# 1. Installs uv (if not present)
# 2. Installs sibyl-cli via uv
# 3. Starts Sibyl (prompts for API keys on first run)
set -eu
# ============================================================================
# Colors (SilkCircuit palette)
# ============================================================================
PURPLE=$(printf '\033[38;2;225;53;255m')
CYAN=$(printf '\033[38;2;128;255;234m')
GREEN=$(printf '\033[38;2;80;250;123m')
YELLOW=$(printf '\033[38;2;241;250;140m')
RED=$(printf '\033[38;2;255;99;99m')
DIM=$(printf '\033[2m')
BOLD=$(printf '\033[1m')
RESET=$(printf '\033[0m')
# ============================================================================
# Helpers
# ============================================================================
info() { printf '%s\n' "${CYAN}▸${RESET} $1"; }
success() { printf '%s\n' "${GREEN}✓${RESET} $1"; }
warn() { printf '%s\n' "${YELLOW}!${RESET} $1"; }
error() { printf '%s\n' "${RED}✗${RESET} $1"; exit 1; }
banner() {
printf '%s' "${PURPLE}${BOLD}"
cat << 'EOF'
_____ _ __ __
/ ___/(_) /_ __ __/ /
\__ \/ / __ \/ / / / /
___/ / / /_/ / /_/ / /
/____/_/_.___/\__, /_/
/____/
EOF
printf '%s\n' "${RESET}"
printf '%s\n' "${DIM}Collective Intelligence Runtime${RESET}"
echo
}
# ============================================================================
# Checks
# ============================================================================
check_os() {
case "$(uname -s)" in
Linux*) OS=linux ;;
Darwin*) OS=macos ;;
*) error "Unsupported OS: $(uname -s). Use Linux or macOS." ;;
esac
}
check_docker() {
if ! command -v docker >/dev/null 2>&1; then
error "Docker is required but not installed.\n\n Install from: https://docs.docker.com/get-docker/"
fi
if ! docker info >/dev/null 2>&1; then
error "Docker daemon is not running.\n\n Start Docker and try again."
fi
success "Docker is available"
}
# ============================================================================
# Installation
# ============================================================================
install_uv() {
if command -v uv >/dev/null 2>&1; then
success "uv is already installed ($(uv --version))"
return
fi
info "Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add to PATH for this session
export PATH="$HOME/.local/bin:$PATH"
if command -v uv >/dev/null 2>&1; then
success "uv installed successfully"
else
error "Failed to install uv"
fi
}
install_sibyl() {
info "Installing sibyl-dev..."
if uv tool list 2>/dev/null | grep -q "sibyl-dev"; then
warn "sibyl-dev is already installed, upgrading..."
uv tool upgrade sibyl-dev
else
uv tool install sibyl-dev
fi
# Ensure tool bin is in PATH
export PATH="$HOME/.local/bin:$PATH"
if command -v sibyl >/dev/null 2>&1; then
success "sibyl-dev installed successfully"
else
error "Failed to install sibyl-dev"
fi
}
# ============================================================================
# Main
# ============================================================================
setup_agent_integration() {
info "Setting up agent integration (skills + hooks)..."
if sibyl local setup >/dev/null 2>&1; then
success "Agent integration configured"
else
warn "Agent integration setup skipped (run 'sibyl local setup' later)"
fi
}
main() {
banner
check_os
check_docker
echo
install_uv
install_sibyl
echo
setup_agent_integration
echo
printf '%s\n' "${GREEN}${BOLD}Installation complete!${RESET}"
echo
printf '%s\n' "Starting Sibyl..."
echo
# Start Sibyl (will prompt for API keys on first run)
sibyl local start
}
main "$@"