-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·61 lines (53 loc) · 1.72 KB
/
setup.sh
File metadata and controls
executable file
·61 lines (53 loc) · 1.72 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
#!/bin/bash
set -e
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd "$SCRIPT_DIR"
echo "=== ChunkSilo Setup ==="
if ! command -v python3.11 &> /dev/null; then
echo "Error: python3.11 is required but not found." >&2
exit 1
fi
# Setup venv
if [ -d "venv" ]; then
echo "Removing existing virtual environment..."
rm -rf venv
fi
echo "Creating virtual environment..."
python3.11 -m venv venv
echo "Installing dependencies..."
DEP_DIR="$SCRIPT_DIR/dependencies"
if [ -d "$DEP_DIR" ] && [ -n "$(ls -A "$DEP_DIR" 2>/dev/null)" ]; then
# Packaged mode: use pre-downloaded wheels
echo "Using packaged dependencies from $DEP_DIR"
./venv/bin/pip install --no-index --find-links "$DEP_DIR" --no-cache-dir -r requirements.txt llama-index-readers-confluence jira
else
# Development mode: install from PyPI
echo "Development mode: installing dependencies from PyPI..."
./venv/bin/pip install --no-cache-dir -r requirements.txt llama-index-readers-confluence jira
fi
# Install the package itself (entry points, no deps since they're already installed)
./venv/bin/pip install --no-deps .
echo ""
echo "=== Setup Complete ==="
echo ""
echo "Next steps:"
echo "1. Edit config.yaml to configure your directories and settings"
echo "2. Add documents to ./data (or update indexing.directories in config.yaml)"
echo "3. Build the index: ./venv/bin/python -m chunksilo.index"
echo "4. Configure your MCP client (see example below)"
echo ""
echo "=== MCP Client Configuration ==="
echo ""
echo "Add this to your MCP client settings:"
echo ""
cat << EOF
{
"mcpServers": {
"chunksilo": {
"command": "$SCRIPT_DIR/venv/bin/python",
"args": ["-m", "chunksilo.server"],
"cwd": "$SCRIPT_DIR"
}
}
}
EOF