abtars 0.1.0-alpha.26 → 0.1.0-alpha.27
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/package.json +1 -1
- package/scripts/install.sh +69 -0
package/package.json
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# abTARS installer — one command to set up everything.
|
|
5
|
+
# Usage:
|
|
6
|
+
# curl -fsSL https://raw.githubusercontent.com/aksika/abtars/main/scripts/install.sh | bash
|
|
7
|
+
# curl -fsSL https://raw.githubusercontent.com/aksika/abtars/main/scripts/install.sh | CHANNEL=alpha bash
|
|
8
|
+
|
|
9
|
+
CHANNEL="${CHANNEL:-latest}"
|
|
10
|
+
TAG=""
|
|
11
|
+
[ "$CHANNEL" = "alpha" ] && TAG="@alpha"
|
|
12
|
+
|
|
13
|
+
echo "━━━ abTARS installer (channel: $CHANNEL) ━━━"
|
|
14
|
+
echo ""
|
|
15
|
+
|
|
16
|
+
# ── 1. Node.js ──
|
|
17
|
+
if command -v node &>/dev/null; then
|
|
18
|
+
NODE_VER=$(node -v | sed 's/v//' | cut -d. -f1)
|
|
19
|
+
if [ "$NODE_VER" -lt 22 ]; then
|
|
20
|
+
echo "⚠ Node.js $NODE_VER found — need 22+. Installing via fnm..."
|
|
21
|
+
curl -fsSL https://fnm.vercel.app/install | bash
|
|
22
|
+
export PATH="$HOME/.local/share/fnm:$PATH"
|
|
23
|
+
eval "$(fnm env)"
|
|
24
|
+
fnm install 22 && fnm use 22
|
|
25
|
+
else
|
|
26
|
+
echo "✓ Node.js $(node -v)"
|
|
27
|
+
fi
|
|
28
|
+
else
|
|
29
|
+
echo "→ Installing Node.js 22 via fnm..."
|
|
30
|
+
curl -fsSL https://fnm.vercel.app/install | bash
|
|
31
|
+
export PATH="$HOME/.local/share/fnm:$PATH"
|
|
32
|
+
eval "$(fnm env)"
|
|
33
|
+
fnm install 22 && fnm use 22
|
|
34
|
+
echo "✓ Node.js $(node -v)"
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# ── 2. Install packages ──
|
|
38
|
+
echo ""
|
|
39
|
+
echo "→ Installing abtars${TAG} and abmind${TAG}..."
|
|
40
|
+
npm install -g "abtars${TAG}" "abmind${TAG}" --no-audit --no-fund
|
|
41
|
+
echo "✓ Packages installed"
|
|
42
|
+
|
|
43
|
+
# ── 3. abmind install ──
|
|
44
|
+
echo ""
|
|
45
|
+
echo "━━━ Memory setup (abmind) ━━━"
|
|
46
|
+
abmind install
|
|
47
|
+
|
|
48
|
+
# ── 4. abtars install + update ──
|
|
49
|
+
echo ""
|
|
50
|
+
echo "━━━ Bridge setup (abtars) ━━━"
|
|
51
|
+
abtars install
|
|
52
|
+
abtars update
|
|
53
|
+
|
|
54
|
+
# ── 5. Onboard ──
|
|
55
|
+
echo ""
|
|
56
|
+
echo "━━━ Configuration ━━━"
|
|
57
|
+
abtars onboard
|
|
58
|
+
|
|
59
|
+
# ── Done ──
|
|
60
|
+
echo ""
|
|
61
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
62
|
+
echo "✓ abTARS installed and configured!"
|
|
63
|
+
echo ""
|
|
64
|
+
echo "Start the bridge:"
|
|
65
|
+
echo " sudo \$(which abtars) daemon install"
|
|
66
|
+
echo ""
|
|
67
|
+
echo "Or manual mode (no auto-start on boot):"
|
|
68
|
+
echo " abtars start"
|
|
69
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|