-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·56 lines (44 loc) · 1.44 KB
/
setup.sh
File metadata and controls
executable file
·56 lines (44 loc) · 1.44 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
#!/bin/bash
# Setup script for Claude Project Chat
set -e
echo "Setting up Claude Project Chat..."
# Check Python version
PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}' | cut -d. -f1,2)
REQUIRED_VERSION="3.9"
if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$PYTHON_VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then
echo "Error: Python $REQUIRED_VERSION or higher is required (found $PYTHON_VERSION)"
exit 1
fi
echo "Using Python $PYTHON_VERSION"
# Remove existing venv if it exists
if [ -d "venv" ]; then
echo "Removing existing virtual environment..."
rm -rf venv
fi
# Create virtual environment
echo "Creating virtual environment..."
python3 -m venv venv
# Upgrade pip
echo "Upgrading pip..."
./venv/bin/pip install --upgrade pip
# Install dependencies
echo "Installing dependencies..."
./venv/bin/pip install -r requirements.txt
# Create .env from example if it doesn't exist
if [ ! -f ".env" ]; then
if [ -f ".env.example" ]; then
echo "Creating .env from .env.example..."
cp .env.example .env
echo "Please edit .env with your credentials"
fi
fi
# Create uploads directory if it doesn't exist
mkdir -p static/uploads
echo ""
echo "Setup complete!"
echo ""
echo "Next steps:"
echo " 1. Edit .env with your credentials (API key or Claude cookie)"
echo " 2. Run the app with: ./venv/bin/python app.py"
echo " Or activate venv first: source venv/bin/activate && python app.py"
echo ""