-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·91 lines (79 loc) · 2.47 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·91 lines (79 loc) · 2.47 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
#!/bin/bash
set -e
GITHUB_REPO="KuaishouGameMind/arag-cli"
BINARY_NAME="arag-cli"
INSTALL_DIR="$HOME/.cargo/bin"
detect_platform() {
local os arch
case "$(uname -s)" in
Linux) os="linux" ;;
Darwin) os="macos" ;;
*) echo "unsupported"; return 1 ;;
esac
case "$(uname -m)" in
x86_64|amd64) arch="x86_64" ;;
arm64|aarch64) arch="arm64" ;;
*) echo "unsupported"; return 1 ;;
esac
echo "${os}-${arch}"
}
PLATFORM=$(detect_platform)
if [ "$PLATFORM" = "unsupported" ]; then
echo "Unsupported platform. Supported: Linux x86_64, macOS x86_64, macOS arm64"
exit 1
fi
ASSET="arag-cli-${PLATFORM}"
if [[ "$PLATFORM" == windows-* ]]; then
ASSET="${ASSET}.exe"
fi
DOWNLOAD_URL="https://github.com/${GITHUB_REPO}/releases/latest/download/${ASSET}"
echo "=========================================="
echo " Arag CLI Installation Script"
echo "=========================================="
echo ""
echo "Platform: $PLATFORM"
echo "Download: $DOWNLOAD_URL"
echo ""
echo "Downloading arag-cli..."
curl -sSL -o /tmp/${ASSET} "$DOWNLOAD_URL"
echo "Installing to $INSTALL_DIR/"
mkdir -p "$INSTALL_DIR"
cp "/tmp/${ASSET}" "$INSTALL_DIR/${BINARY_NAME}"
chmod +x "$INSTALL_DIR/${BINARY_NAME}"
rm -f "/tmp/${ASSET}"
echo ""
SKILL_URL="https://github.com/${GITHUB_REPO}/releases/latest/download/SKILL.md"
SKILL_DST="$HOME/.agents/skills/arag-cli"
echo "Installing Skill to $SKILL_DST/ ..."
mkdir -p "$SKILL_DST"
curl -sSL -o "$SKILL_DST/SKILL.md" "$SKILL_URL"
echo ""
echo "=========================================="
echo " Installation complete!"
echo "=========================================="
echo ""
echo "Ensure ~/.cargo/bin is in your PATH:"
echo " export PATH=\"\$HOME/.cargo/bin:\$PATH\""
echo ""
echo "Verify installation:"
echo " arag-cli health"
echo ""
echo "=========================================="
echo " Next: Configure Embedding API"
echo "=========================================="
echo ""
echo "For full functionality (semantic-search, hybrid search),"
echo "configure your embedding API:"
echo ""
echo " arag-cli config set --base-url <your-api-url>"
echo " arag-cli config set --api-key <your-api-key>"
echo " arag-cli config set --model <model-name>"
echo ""
echo "Without embedding API, you can still use:"
echo " - keyword-search (BM25)"
echo " - read-chunk"
echo " - build-index --no-embedding (BM25-only index)"
echo ""
echo "Then build your first index:"
echo " arag-cli build-index --input-dir <your-docs>"
echo ""