-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup
More file actions
executable file
·30 lines (22 loc) · 1.17 KB
/
setup
File metadata and controls
executable file
·30 lines (22 loc) · 1.17 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
#!/usr/bin/env bash
set -euo pipefail
REPO="https://github.com/crabtalk/wechat-skill"
SKILL_DIR="$HOME/.claude/skills/crabchat"
# ── Step 1: ensure cargo is available ────────────────────────────────
if ! command -v cargo &>/dev/null; then
echo "==> Rust not found, installing via rustup..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
fi
# ── Step 2: install crabchat binary ──────────────────────────────────
echo "==> Installing crabchat"
cargo install --git "$REPO" crabchat --locked
# ── Step 3: install skill definition ─────────────────────────────────
echo "==> Installing skill to $SKILL_DIR"
mkdir -p "$SKILL_DIR"
curl -sSfL "$REPO/raw/main/crabchat/SKILL.md" -o "$SKILL_DIR/SKILL.md"
echo "==> Done!"
echo " Binary: $(command -v crabchat 2>/dev/null || echo '~/.cargo/bin/crabchat')"
echo " Skill: $SKILL_DIR/SKILL.md"
echo ""
echo "Next: ensure to_user_id is set in ~/.config/crabtalk/gateway.toml"