fluxy-bot 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +28 -12
- package/package.json +1 -1
- package/scripts/install +13 -14
- package/scripts/install.ps1 +46 -24
- package/scripts/install.sh +13 -14
package/bin/cli.js
CHANGED
|
@@ -37,10 +37,25 @@ const c = {
|
|
|
37
37
|
const SPINNER = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
38
38
|
const BAR_WIDTH = 30;
|
|
39
39
|
|
|
40
|
+
function gradientChar(i, total) {
|
|
41
|
+
const t = total > 1 ? i / (total - 1) : 0;
|
|
42
|
+
const r = Math.round(50 + t * (219 - 50));
|
|
43
|
+
const g = Math.round(165 + t * (54 - 165));
|
|
44
|
+
const b = Math.round(247 + t * (163 - 247));
|
|
45
|
+
return `\x1b[38;2;${r};${g};${b}m`;
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
function progressBar(ratio, width = BAR_WIDTH) {
|
|
41
49
|
const filled = Math.round(ratio * width);
|
|
42
50
|
const empty = width - filled;
|
|
43
|
-
|
|
51
|
+
let bar = '';
|
|
52
|
+
for (let i = 0; i < filled; i++) bar += `${gradientChar(i, width)}█`;
|
|
53
|
+
bar += `${c.dim}${'░'.repeat(empty)}${c.reset}`;
|
|
54
|
+
return bar;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function link(url) {
|
|
58
|
+
return `\x1b]8;;${url}\x07${url}\x1b]8;;\x07`;
|
|
44
59
|
}
|
|
45
60
|
|
|
46
61
|
class Stepper {
|
|
@@ -72,9 +87,9 @@ class Stepper {
|
|
|
72
87
|
|
|
73
88
|
for (let i = 0; i < this.steps.length; i++) {
|
|
74
89
|
if (i < this.current) {
|
|
75
|
-
console.log(` ${c.
|
|
90
|
+
console.log(` ${c.blue}✔${c.reset} ${this.steps[i]}`);
|
|
76
91
|
} else if (i === this.current) {
|
|
77
|
-
console.log(` ${c.
|
|
92
|
+
console.log(` ${c.pink}${SPINNER[this.frame]}${c.reset} ${this.steps[i]}${c.dim}...${c.reset}`);
|
|
78
93
|
} else {
|
|
79
94
|
console.log(` ${c.dim}○ ${this.steps[i]}${c.reset}`);
|
|
80
95
|
}
|
|
@@ -94,9 +109,9 @@ class Stepper {
|
|
|
94
109
|
|
|
95
110
|
process.stdout.write(`\x1b[${this.steps.length + 2}A`);
|
|
96
111
|
for (const step of this.steps) {
|
|
97
|
-
console.log(` ${c.
|
|
112
|
+
console.log(` ${c.blue}✔${c.reset} ${step}`);
|
|
98
113
|
}
|
|
99
|
-
console.log(`\n ${progressBar(1)} ${c.
|
|
114
|
+
console.log(`\n ${progressBar(1)} ${c.pink}Done${c.reset}`);
|
|
100
115
|
}
|
|
101
116
|
}
|
|
102
117
|
|
|
@@ -115,13 +130,14 @@ function finalMessage(tunnelUrl, relayUrl) {
|
|
|
115
130
|
|
|
116
131
|
${c.bold}${c.white}Open your dashboard to finish setup:${c.reset}
|
|
117
132
|
|
|
118
|
-
${c.blue}${c.bold}${tunnelUrl}${c.reset}
|
|
133
|
+
${c.blue}${c.bold}${link(tunnelUrl)}${c.reset}
|
|
134
|
+
${c.dim}(cmd+click or ctrl+click to open)${c.reset}`);
|
|
119
135
|
|
|
120
136
|
if (relayUrl) {
|
|
121
137
|
console.log(`
|
|
122
138
|
${c.bold}${c.white}Your permanent URL:${c.reset}
|
|
123
139
|
|
|
124
|
-
${c.
|
|
140
|
+
${c.pink}${c.bold}${link(relayUrl)}${c.reset}`);
|
|
125
141
|
}
|
|
126
142
|
|
|
127
143
|
console.log(`
|
|
@@ -388,10 +404,10 @@ async function status() {
|
|
|
388
404
|
const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8'));
|
|
389
405
|
const res = await fetch(`http://localhost:${config.port}/api/health`);
|
|
390
406
|
const data = await res.json();
|
|
391
|
-
console.log(`\n ${c.
|
|
407
|
+
console.log(`\n ${c.blue}●${c.reset} Bot is running`);
|
|
392
408
|
console.log(` ${c.dim}Uptime: ${data.uptime}s${c.reset}`);
|
|
393
409
|
if (config.relay?.url) {
|
|
394
|
-
console.log(` ${c.dim}URL: ${config.relay.url}${c.reset}`);
|
|
410
|
+
console.log(` ${c.dim}URL: ${c.reset}${c.pink}${link(config.relay.url)}${c.reset}`);
|
|
395
411
|
}
|
|
396
412
|
console.log(` ${c.dim}Config: ${CONFIG_PATH}${c.reset}\n`);
|
|
397
413
|
} catch {
|
|
@@ -418,7 +434,7 @@ async function update() {
|
|
|
418
434
|
}
|
|
419
435
|
|
|
420
436
|
if (currentVersion === latest.version) {
|
|
421
|
-
console.log(` ${c.
|
|
437
|
+
console.log(` ${c.blue}✔${c.reset} Already up to date (v${currentVersion})\n`);
|
|
422
438
|
return;
|
|
423
439
|
}
|
|
424
440
|
|
|
@@ -510,8 +526,8 @@ async function update() {
|
|
|
510
526
|
|
|
511
527
|
stepper.finish();
|
|
512
528
|
|
|
513
|
-
console.log(`\n ${c.
|
|
514
|
-
console.log(` ${c.dim}Run ${c.reset}${c.
|
|
529
|
+
console.log(`\n ${c.blue}${c.bold}✔ Updated to v${latest.version}${c.reset}\n`);
|
|
530
|
+
console.log(` ${c.dim}Run ${c.reset}${c.pink}fluxy start${c.reset}${c.dim} to launch.${c.reset}\n`);
|
|
515
531
|
}
|
|
516
532
|
|
|
517
533
|
// ── Route ──
|
package/package.json
CHANGED
package/scripts/install
CHANGED
|
@@ -18,7 +18,6 @@ USE_SYSTEM_NODE=false
|
|
|
18
18
|
# Brand colors: #32A5F7 (blue) and #DB36A3 (pink) via 256-color approximation
|
|
19
19
|
BLUE='\033[38;2;50;165;247m'
|
|
20
20
|
PINK='\033[38;2;219;54;163m'
|
|
21
|
-
GREEN='\033[32m'
|
|
22
21
|
YELLOW='\033[33m'
|
|
23
22
|
RED='\033[31m'
|
|
24
23
|
DIM='\033[2m'
|
|
@@ -31,7 +30,7 @@ printf "${BLUE}${BOLD} / _/ / / __ __ __ __ __ ${RESET}\n"
|
|
|
31
30
|
printf "${PINK}${BOLD} / _/ / / / / / / \\ \\/ / / / ${RESET}\n"
|
|
32
31
|
printf "${PINK}${BOLD} /_/ /_/ \\_,_/ /_/\\_\\ /_/ ${RESET}\n"
|
|
33
32
|
printf "\n"
|
|
34
|
-
printf "${DIM} Self-hosted AI
|
|
33
|
+
printf "${DIM} Self-hosted, self-evolving AI agent with its own dashboard.${RESET}\n"
|
|
35
34
|
printf "${DIM} ─────────────────────────────${RESET}\n\n"
|
|
36
35
|
|
|
37
36
|
# ─── Detect platform ────────────────────────────────────────────────────────
|
|
@@ -71,7 +70,7 @@ check_system_node() {
|
|
|
71
70
|
MAJOR=$(echo "$SYS_NODE_VERSION" | sed 's/^v//' | cut -d. -f1)
|
|
72
71
|
if [ "$MAJOR" -ge "$MIN_NODE_MAJOR" ] 2>/dev/null; then
|
|
73
72
|
USE_SYSTEM_NODE=true
|
|
74
|
-
printf " ${
|
|
73
|
+
printf " ${BLUE}✔${RESET} Node.js ${SYS_NODE_VERSION} (system)\n"
|
|
75
74
|
return 0
|
|
76
75
|
fi
|
|
77
76
|
fi
|
|
@@ -86,7 +85,7 @@ install_node() {
|
|
|
86
85
|
if [ -x "$NODE_DIR/bin/node" ]; then
|
|
87
86
|
EXISTING=$("$NODE_DIR/bin/node" -v 2>/dev/null || echo "")
|
|
88
87
|
if [ -n "$EXISTING" ]; then
|
|
89
|
-
printf " ${
|
|
88
|
+
printf " ${BLUE}✔${RESET} Node.js ${EXISTING} (bundled)\n"
|
|
90
89
|
return 0
|
|
91
90
|
fi
|
|
92
91
|
fi
|
|
@@ -120,7 +119,7 @@ install_node() {
|
|
|
120
119
|
exit 1
|
|
121
120
|
fi
|
|
122
121
|
|
|
123
|
-
printf " ${
|
|
122
|
+
printf " ${BLUE}✔${RESET} Node.js v${NODE_VERSION} installed\n"
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
# ─── Install Fluxy ────────────────────────────────────────────────────────
|
|
@@ -184,16 +183,16 @@ install_fluxy() {
|
|
|
184
183
|
if [ -d "$EXTRACTED/dist-fluxy" ]; then
|
|
185
184
|
rm -rf "$FLUXY_HOME/dist-fluxy"
|
|
186
185
|
cp -r "$EXTRACTED/dist-fluxy" "$FLUXY_HOME/"
|
|
187
|
-
printf " ${
|
|
186
|
+
printf " ${BLUE}✔${RESET} Chat interface ready\n"
|
|
188
187
|
elif [ ! -f "$FLUXY_HOME/dist-fluxy/onboard.html" ]; then
|
|
189
188
|
printf " ${BLUE}↓${RESET} Building chat interface...\n"
|
|
190
189
|
if (cd "$FLUXY_HOME" && "$NPM" run build:fluxy 2>/dev/null); then
|
|
191
|
-
printf " ${
|
|
190
|
+
printf " ${BLUE}✔${RESET} Chat interface built\n"
|
|
192
191
|
else
|
|
193
192
|
printf " ${YELLOW}!${RESET} Chat build skipped — will build on first start\n"
|
|
194
193
|
fi
|
|
195
194
|
else
|
|
196
|
-
printf " ${
|
|
195
|
+
printf " ${BLUE}✔${RESET} Chat interface ready\n"
|
|
197
196
|
fi
|
|
198
197
|
|
|
199
198
|
rm -rf "$TMPDIR"
|
|
@@ -209,7 +208,7 @@ install_fluxy() {
|
|
|
209
208
|
|
|
210
209
|
VERSION=$("$NODE" -e "const p=JSON.parse(require('fs').readFileSync('$FLUXY_HOME/package.json','utf8'));console.log(p.version)" 2>/dev/null || echo "unknown")
|
|
211
210
|
|
|
212
|
-
printf " ${
|
|
211
|
+
printf " ${BLUE}✔${RESET} Fluxy v${VERSION} installed\n"
|
|
213
212
|
}
|
|
214
213
|
|
|
215
214
|
# ─── Create wrapper script ──────────────────────────────────────────────────
|
|
@@ -237,7 +236,7 @@ WRAPPER
|
|
|
237
236
|
fi
|
|
238
237
|
|
|
239
238
|
chmod +x "$BIN_DIR/fluxy"
|
|
240
|
-
printf " ${
|
|
239
|
+
printf " ${BLUE}✔${RESET} Created ${DIM}~/.fluxy/bin/fluxy${RESET}\n"
|
|
241
240
|
}
|
|
242
241
|
|
|
243
242
|
# ─── Add to PATH ────────────────────────────────────────────────────────────
|
|
@@ -271,7 +270,7 @@ setup_path() {
|
|
|
271
270
|
if ! grep -q "fluxy/bin" "$HOME/.config/fish/config.fish" 2>/dev/null; then
|
|
272
271
|
echo 'set -gx PATH "$HOME/.fluxy/bin" $PATH' >> "$HOME/.config/fish/config.fish"
|
|
273
272
|
fi
|
|
274
|
-
printf " ${
|
|
273
|
+
printf " ${BLUE}✔${RESET} Added to PATH ${DIM}(~/.config/fish/config.fish)${RESET}\n"
|
|
275
274
|
return 0
|
|
276
275
|
;;
|
|
277
276
|
*) PROFILE="$HOME/.profile" ;;
|
|
@@ -281,7 +280,7 @@ setup_path() {
|
|
|
281
280
|
if ! grep -q "fluxy/bin" "$PROFILE" 2>/dev/null; then
|
|
282
281
|
printf "\n# Fluxy\n%s\n" "$EXPORT_LINE" >> "$PROFILE"
|
|
283
282
|
fi
|
|
284
|
-
printf " ${
|
|
283
|
+
printf " ${BLUE}✔${RESET} Added to PATH ${DIM}(${PROFILE})${RESET}\n"
|
|
285
284
|
fi
|
|
286
285
|
|
|
287
286
|
export PATH="$BIN_DIR:$PATH"
|
|
@@ -298,7 +297,7 @@ create_wrapper
|
|
|
298
297
|
setup_path
|
|
299
298
|
|
|
300
299
|
printf "\n"
|
|
301
|
-
printf " ${
|
|
300
|
+
printf " ${PINK}${BOLD}✔ Fluxy is ready!${RESET}\n"
|
|
302
301
|
printf "\n"
|
|
303
302
|
printf " ${DIM}─────────────────────────────${RESET}\n"
|
|
304
303
|
printf " ${BOLD}Get started:${RESET}\n"
|
|
@@ -310,5 +309,5 @@ printf "\n"
|
|
|
310
309
|
printf " ${PINK}>${RESET} Run ${BLUE}fluxy init${RESET} to begin.\n"
|
|
311
310
|
printf " ${DIM}(Open a new terminal if 'fluxy' isn't found yet)${RESET}\n"
|
|
312
311
|
printf "\n"
|
|
313
|
-
printf " ${DIM}https://fluxy.bot
|
|
312
|
+
printf " ${DIM}\033]8;;https://fluxy.bot\033\\https://fluxy.bot\033]8;;\033\\${RESET}\n"
|
|
314
313
|
printf "\n"
|
package/scripts/install.ps1
CHANGED
|
@@ -26,6 +26,16 @@ $RSET = "`e[0m"
|
|
|
26
26
|
# Use ANSI sequences for consistent rendering; fallback to plain if no VT support
|
|
27
27
|
$vtSupported = $null -ne $env:WT_SESSION -or $PSVersionTable.PSVersion.Major -ge 7 -or $host.UI.SupportsVirtualTerminal
|
|
28
28
|
|
|
29
|
+
function Write-Check($text) {
|
|
30
|
+
if ($vtSupported) { Write-Host " ${BLUE}✔${RSET} $text" }
|
|
31
|
+
else { Write-Host " ✔ $text" -ForegroundColor Cyan }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Write-Down($text) {
|
|
35
|
+
if ($vtSupported) { Write-Host " ${PINK}↓${RSET} $text" }
|
|
36
|
+
else { Write-Host " ↓ $text" -ForegroundColor Cyan }
|
|
37
|
+
}
|
|
38
|
+
|
|
29
39
|
Write-Host ""
|
|
30
40
|
if ($vtSupported) {
|
|
31
41
|
Write-Host "${BLUE}${BOLD} ___ __ ${RSET}"
|
|
@@ -39,7 +49,7 @@ if ($vtSupported) {
|
|
|
39
49
|
Write-Host " /_/ /_/ \_,_/ /_/\_\ /_/ " -ForegroundColor Magenta
|
|
40
50
|
}
|
|
41
51
|
Write-Host ""
|
|
42
|
-
Write-Host " Self-hosted AI
|
|
52
|
+
Write-Host " Self-hosted, self-evolving AI agent with its own dashboard." -ForegroundColor DarkGray
|
|
43
53
|
Write-Host " -----------------------------" -ForegroundColor DarkGray
|
|
44
54
|
Write-Host ""
|
|
45
55
|
|
|
@@ -72,7 +82,7 @@ function Check-SystemNode {
|
|
|
72
82
|
$major = [int]$Matches[1]
|
|
73
83
|
if ($major -ge $MIN_NODE_MAJOR) {
|
|
74
84
|
$script:USE_SYSTEM_NODE = $true
|
|
75
|
-
Write-
|
|
85
|
+
Write-Check "Node.js $ver (system)"
|
|
76
86
|
return $true
|
|
77
87
|
}
|
|
78
88
|
}
|
|
@@ -91,13 +101,13 @@ function Install-Node {
|
|
|
91
101
|
try {
|
|
92
102
|
$existing = & $nodeBin -v 2>$null
|
|
93
103
|
if ($existing) {
|
|
94
|
-
Write-
|
|
104
|
+
Write-Check "Node.js $existing (bundled)"
|
|
95
105
|
return
|
|
96
106
|
}
|
|
97
107
|
} catch {}
|
|
98
108
|
}
|
|
99
109
|
|
|
100
|
-
Write-
|
|
110
|
+
Write-Down "Downloading Node.js v${NODE_VERSION}..."
|
|
101
111
|
|
|
102
112
|
$nodeUrl = "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-win-${NODEARCH}.zip"
|
|
103
113
|
$tmpFile = Join-Path ([System.IO.Path]::GetTempPath()) "node-fluxy.zip"
|
|
@@ -125,7 +135,7 @@ function Install-Node {
|
|
|
125
135
|
exit 1
|
|
126
136
|
}
|
|
127
137
|
|
|
128
|
-
Write-
|
|
138
|
+
Write-Check "Node.js v${NODE_VERSION} installed"
|
|
129
139
|
}
|
|
130
140
|
|
|
131
141
|
# ─── Install Fluxy ────────────────────────────────────────────────────────
|
|
@@ -146,7 +156,7 @@ function Install-Fluxy {
|
|
|
146
156
|
Write-Host " Latest npm version: fluxy-bot@${npmVersion}" -ForegroundColor DarkGray
|
|
147
157
|
}
|
|
148
158
|
|
|
149
|
-
Write-
|
|
159
|
+
Write-Down "Installing fluxy..."
|
|
150
160
|
|
|
151
161
|
$tarballUrl = (& $NPM view fluxy-bot dist.tarball 2>$null).Trim()
|
|
152
162
|
if (-not $tarballUrl) {
|
|
@@ -203,19 +213,19 @@ function Install-Fluxy {
|
|
|
203
213
|
if (Test-Path $distSrc) {
|
|
204
214
|
if (Test-Path $distDst) { Remove-Item $distDst -Recurse -Force }
|
|
205
215
|
Copy-Item -Path $distSrc -Destination $distDst -Recurse
|
|
206
|
-
Write-
|
|
216
|
+
Write-Check "Chat interface ready"
|
|
207
217
|
} elseif (-not (Test-Path (Join-Path $distDst "onboard.html"))) {
|
|
208
|
-
Write-
|
|
218
|
+
Write-Down "Building chat interface..."
|
|
209
219
|
Push-Location $FLUXY_HOME
|
|
210
220
|
try {
|
|
211
221
|
& $NPM run build:fluxy 2>$null
|
|
212
|
-
Write-
|
|
222
|
+
Write-Check "Chat interface built"
|
|
213
223
|
} catch {
|
|
214
224
|
Write-Host " ! Chat build failed — will build on first start" -ForegroundColor Yellow
|
|
215
225
|
}
|
|
216
226
|
Pop-Location
|
|
217
227
|
} else {
|
|
218
|
-
Write-
|
|
228
|
+
Write-Check "Chat interface ready"
|
|
219
229
|
}
|
|
220
230
|
} finally {
|
|
221
231
|
Remove-Item $tmpDir -Recurse -Force -ErrorAction SilentlyContinue
|
|
@@ -241,7 +251,7 @@ function Install-Fluxy {
|
|
|
241
251
|
$script:VERSION = $pkgJson.version
|
|
242
252
|
} catch {}
|
|
243
253
|
|
|
244
|
-
Write-
|
|
254
|
+
Write-Check "Fluxy v${VERSION} installed"
|
|
245
255
|
}
|
|
246
256
|
|
|
247
257
|
# ─── Create wrapper script ──────────────────────────────────────────────────
|
|
@@ -266,7 +276,7 @@ node "%USERPROFILE%\.fluxy\bin\cli.js" %*
|
|
|
266
276
|
}
|
|
267
277
|
|
|
268
278
|
Set-Content -Path $wrapperPath -Value $wrapper -Encoding ASCII
|
|
269
|
-
Write-
|
|
279
|
+
Write-Check "Created ~/.fluxy/bin/fluxy.cmd"
|
|
270
280
|
}
|
|
271
281
|
|
|
272
282
|
# ─── Add to PATH ────────────────────────────────────────────────────────────
|
|
@@ -276,9 +286,9 @@ function Setup-Path {
|
|
|
276
286
|
if ($userPath -notlike "*$BIN_DIR*") {
|
|
277
287
|
[Environment]::SetEnvironmentVariable("Path", "$BIN_DIR;$userPath", "User")
|
|
278
288
|
$env:Path = "$BIN_DIR;$env:Path"
|
|
279
|
-
Write-
|
|
289
|
+
Write-Check "Added to PATH"
|
|
280
290
|
} else {
|
|
281
|
-
Write-
|
|
291
|
+
Write-Check "PATH already configured"
|
|
282
292
|
}
|
|
283
293
|
}
|
|
284
294
|
|
|
@@ -293,19 +303,31 @@ Create-Wrapper
|
|
|
293
303
|
Setup-Path
|
|
294
304
|
|
|
295
305
|
Write-Host ""
|
|
296
|
-
|
|
306
|
+
if ($vtSupported) {
|
|
307
|
+
Write-Host " ${PINK}${BOLD}✔ Fluxy is ready!${RSET}"
|
|
308
|
+
} else {
|
|
309
|
+
Write-Host " ✔ Fluxy is ready!" -ForegroundColor Magenta
|
|
310
|
+
}
|
|
297
311
|
Write-Host ""
|
|
298
312
|
Write-Host " -----------------------------" -ForegroundColor DarkGray
|
|
299
|
-
Write-Host " Get started:"
|
|
300
|
-
Write-Host ""
|
|
301
|
-
Write-Host " fluxy init " -ForegroundColor Cyan -NoNewline; Write-Host "Set up your bot"
|
|
302
|
-
Write-Host " fluxy start " -ForegroundColor Cyan -NoNewline; Write-Host "Start your bot"
|
|
303
|
-
Write-Host " fluxy status " -ForegroundColor Cyan -NoNewline; Write-Host "Check if it's running"
|
|
313
|
+
Write-Host " Get started:"
|
|
304
314
|
Write-Host ""
|
|
305
|
-
|
|
306
|
-
Write-Host "
|
|
307
|
-
Write-Host "fluxy
|
|
308
|
-
Write-Host "
|
|
315
|
+
if ($vtSupported) {
|
|
316
|
+
Write-Host " ${BLUE}fluxy init${RSET} Set up your bot"
|
|
317
|
+
Write-Host " ${BLUE}fluxy start${RSET} Start your bot"
|
|
318
|
+
Write-Host " ${BLUE}fluxy status${RSET} Check if it's running"
|
|
319
|
+
Write-Host ""
|
|
320
|
+
Write-Host " ${PINK}>${RSET} Run ${BLUE}fluxy init${RSET} to begin."
|
|
321
|
+
} else {
|
|
322
|
+
Write-Host " fluxy init " -ForegroundColor Cyan -NoNewline; Write-Host "Set up your bot"
|
|
323
|
+
Write-Host " fluxy start " -ForegroundColor Cyan -NoNewline; Write-Host "Start your bot"
|
|
324
|
+
Write-Host " fluxy status " -ForegroundColor Cyan -NoNewline; Write-Host "Check if it's running"
|
|
325
|
+
Write-Host ""
|
|
326
|
+
Write-Host " > " -ForegroundColor Magenta -NoNewline
|
|
327
|
+
Write-Host "Run " -NoNewline
|
|
328
|
+
Write-Host "fluxy init" -ForegroundColor Cyan -NoNewline
|
|
329
|
+
Write-Host " to begin."
|
|
330
|
+
}
|
|
309
331
|
Write-Host " (Open a new terminal if 'fluxy' isn't found yet)" -ForegroundColor DarkGray
|
|
310
332
|
Write-Host ""
|
|
311
333
|
Write-Host " https://fluxy.bot" -ForegroundColor DarkGray
|
package/scripts/install.sh
CHANGED
|
@@ -18,7 +18,6 @@ USE_SYSTEM_NODE=false
|
|
|
18
18
|
# Brand colors: #32A5F7 (blue) and #DB36A3 (pink) via 256-color approximation
|
|
19
19
|
BLUE='\033[38;2;50;165;247m'
|
|
20
20
|
PINK='\033[38;2;219;54;163m'
|
|
21
|
-
GREEN='\033[32m'
|
|
22
21
|
YELLOW='\033[33m'
|
|
23
22
|
RED='\033[31m'
|
|
24
23
|
DIM='\033[2m'
|
|
@@ -31,7 +30,7 @@ printf "${BLUE}${BOLD} / _/ / / __ __ __ __ __ ${RESET}\n"
|
|
|
31
30
|
printf "${PINK}${BOLD} / _/ / / / / / / \\ \\/ / / / ${RESET}\n"
|
|
32
31
|
printf "${PINK}${BOLD} /_/ /_/ \\_,_/ /_/\\_\\ /_/ ${RESET}\n"
|
|
33
32
|
printf "\n"
|
|
34
|
-
printf "${DIM} Self-hosted AI
|
|
33
|
+
printf "${DIM} Self-hosted, self-evolving AI agent with its own dashboard.${RESET}\n"
|
|
35
34
|
printf "${DIM} ─────────────────────────────${RESET}\n\n"
|
|
36
35
|
|
|
37
36
|
# ─── Detect platform ────────────────────────────────────────────────────────
|
|
@@ -71,7 +70,7 @@ check_system_node() {
|
|
|
71
70
|
MAJOR=$(echo "$SYS_NODE_VERSION" | sed 's/^v//' | cut -d. -f1)
|
|
72
71
|
if [ "$MAJOR" -ge "$MIN_NODE_MAJOR" ] 2>/dev/null; then
|
|
73
72
|
USE_SYSTEM_NODE=true
|
|
74
|
-
printf " ${
|
|
73
|
+
printf " ${BLUE}✔${RESET} Node.js ${SYS_NODE_VERSION} (system)\n"
|
|
75
74
|
return 0
|
|
76
75
|
fi
|
|
77
76
|
fi
|
|
@@ -86,7 +85,7 @@ install_node() {
|
|
|
86
85
|
if [ -x "$NODE_DIR/bin/node" ]; then
|
|
87
86
|
EXISTING=$("$NODE_DIR/bin/node" -v 2>/dev/null || echo "")
|
|
88
87
|
if [ -n "$EXISTING" ]; then
|
|
89
|
-
printf " ${
|
|
88
|
+
printf " ${BLUE}✔${RESET} Node.js ${EXISTING} (bundled)\n"
|
|
90
89
|
return 0
|
|
91
90
|
fi
|
|
92
91
|
fi
|
|
@@ -120,7 +119,7 @@ install_node() {
|
|
|
120
119
|
exit 1
|
|
121
120
|
fi
|
|
122
121
|
|
|
123
|
-
printf " ${
|
|
122
|
+
printf " ${BLUE}✔${RESET} Node.js v${NODE_VERSION} installed\n"
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
# ─── Install Fluxy ────────────────────────────────────────────────────────
|
|
@@ -184,16 +183,16 @@ install_fluxy() {
|
|
|
184
183
|
if [ -d "$EXTRACTED/dist-fluxy" ]; then
|
|
185
184
|
rm -rf "$FLUXY_HOME/dist-fluxy"
|
|
186
185
|
cp -r "$EXTRACTED/dist-fluxy" "$FLUXY_HOME/"
|
|
187
|
-
printf " ${
|
|
186
|
+
printf " ${BLUE}✔${RESET} Chat interface ready\n"
|
|
188
187
|
elif [ ! -f "$FLUXY_HOME/dist-fluxy/onboard.html" ]; then
|
|
189
188
|
printf " ${BLUE}↓${RESET} Building chat interface...\n"
|
|
190
189
|
if (cd "$FLUXY_HOME" && "$NPM" run build:fluxy 2>/dev/null); then
|
|
191
|
-
printf " ${
|
|
190
|
+
printf " ${BLUE}✔${RESET} Chat interface built\n"
|
|
192
191
|
else
|
|
193
192
|
printf " ${YELLOW}!${RESET} Chat build skipped — will build on first start\n"
|
|
194
193
|
fi
|
|
195
194
|
else
|
|
196
|
-
printf " ${
|
|
195
|
+
printf " ${BLUE}✔${RESET} Chat interface ready\n"
|
|
197
196
|
fi
|
|
198
197
|
|
|
199
198
|
rm -rf "$TMPDIR"
|
|
@@ -209,7 +208,7 @@ install_fluxy() {
|
|
|
209
208
|
|
|
210
209
|
VERSION=$("$NODE" -e "const p=JSON.parse(require('fs').readFileSync('$FLUXY_HOME/package.json','utf8'));console.log(p.version)" 2>/dev/null || echo "unknown")
|
|
211
210
|
|
|
212
|
-
printf " ${
|
|
211
|
+
printf " ${BLUE}✔${RESET} Fluxy v${VERSION} installed\n"
|
|
213
212
|
}
|
|
214
213
|
|
|
215
214
|
# ─── Create wrapper script ──────────────────────────────────────────────────
|
|
@@ -237,7 +236,7 @@ WRAPPER
|
|
|
237
236
|
fi
|
|
238
237
|
|
|
239
238
|
chmod +x "$BIN_DIR/fluxy"
|
|
240
|
-
printf " ${
|
|
239
|
+
printf " ${BLUE}✔${RESET} Created ${DIM}~/.fluxy/bin/fluxy${RESET}\n"
|
|
241
240
|
}
|
|
242
241
|
|
|
243
242
|
# ─── Add to PATH ────────────────────────────────────────────────────────────
|
|
@@ -271,7 +270,7 @@ setup_path() {
|
|
|
271
270
|
if ! grep -q "fluxy/bin" "$HOME/.config/fish/config.fish" 2>/dev/null; then
|
|
272
271
|
echo 'set -gx PATH "$HOME/.fluxy/bin" $PATH' >> "$HOME/.config/fish/config.fish"
|
|
273
272
|
fi
|
|
274
|
-
printf " ${
|
|
273
|
+
printf " ${BLUE}✔${RESET} Added to PATH ${DIM}(~/.config/fish/config.fish)${RESET}\n"
|
|
275
274
|
return 0
|
|
276
275
|
;;
|
|
277
276
|
*) PROFILE="$HOME/.profile" ;;
|
|
@@ -281,7 +280,7 @@ setup_path() {
|
|
|
281
280
|
if ! grep -q "fluxy/bin" "$PROFILE" 2>/dev/null; then
|
|
282
281
|
printf "\n# Fluxy\n%s\n" "$EXPORT_LINE" >> "$PROFILE"
|
|
283
282
|
fi
|
|
284
|
-
printf " ${
|
|
283
|
+
printf " ${BLUE}✔${RESET} Added to PATH ${DIM}(${PROFILE})${RESET}\n"
|
|
285
284
|
fi
|
|
286
285
|
|
|
287
286
|
export PATH="$BIN_DIR:$PATH"
|
|
@@ -298,7 +297,7 @@ create_wrapper
|
|
|
298
297
|
setup_path
|
|
299
298
|
|
|
300
299
|
printf "\n"
|
|
301
|
-
printf " ${
|
|
300
|
+
printf " ${PINK}${BOLD}✔ Fluxy is ready!${RESET}\n"
|
|
302
301
|
printf "\n"
|
|
303
302
|
printf " ${DIM}─────────────────────────────${RESET}\n"
|
|
304
303
|
printf " ${BOLD}Get started:${RESET}\n"
|
|
@@ -310,5 +309,5 @@ printf "\n"
|
|
|
310
309
|
printf " ${PINK}>${RESET} Run ${BLUE}fluxy init${RESET} to begin.\n"
|
|
311
310
|
printf " ${DIM}(Open a new terminal if 'fluxy' isn't found yet)${RESET}\n"
|
|
312
311
|
printf "\n"
|
|
313
|
-
printf " ${DIM}https://fluxy.bot
|
|
312
|
+
printf " ${DIM}\033]8;;https://fluxy.bot\033\\https://fluxy.bot\033]8;;\033\\${RESET}\n"
|
|
314
313
|
printf "\n"
|