-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·34 lines (28 loc) · 994 Bytes
/
setup.sh
File metadata and controls
executable file
·34 lines (28 loc) · 994 Bytes
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
#!/usr/bin/env bash
# Setup script for Xref (macOS/Linux)
set -e
echo "Installing Xref dependencies..."
# Check for Python 3
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 is required but not found."
echo "Install Python 3.8 or later and try again."
exit 1
fi
# Install core dependencies
echo "Installing core Python packages..."
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt --no-deps
python3 -m pip install python-docx pymupdf beautifulsoup4 requests lxml jinja2
# Install Playwright for web support if --web flag is provided
if [[ "$1" == "--web" ]]; then
echo "Installing Playwright for web URL support..."
python3 -m pip install playwright
python3 -m playwright install chromium
echo "Web support enabled."
else
echo "Skipping Playwright (web URL support). To enable: bash setup.sh --web"
fi
echo ""
echo "✓ Setup complete!"
echo ""
echo "To verify: python3 skills/xref/tools/xref.py setup-check"