-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·51 lines (43 loc) · 1.17 KB
/
setup.sh
File metadata and controls
executable file
·51 lines (43 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
set -e
echo "🚀 Setting up Browser Agent..."
echo ""
# Check Python version
echo "📋 Checking Python version..."
python_version=$(python3 --version 2>&1 | awk '{print $2}')
echo " Found Python $python_version"
echo ""
# Install Python dependencies
echo "📦 Installing Python dependencies..."
pip install -r requirements.txt
echo ""
# Initialize ConnectOnion project
echo "🔧 Initializing ConnectOnion project..."
if [ ! -d .co ]; then
co init
echo ""
echo "✅ Project initialized!"
else
echo " Project already initialized (found .co directory)"
fi
echo ""
# Install Playwright browsers
echo "🌐 Installing Playwright browsers..."
playwright install
echo ""
# Setup ConnectOnion authentication
echo "🔐 Setting up ConnectOnion authentication..."
echo " This will open a browser for authentication."
echo ""
if [ ! -f .env ] || ! grep -q "OPENONION_API_KEY" .env 2>/dev/null; then
co auth
echo ""
echo "✅ Authentication complete!"
else
echo " Authentication already configured (found .env)"
fi
echo ""
echo "✨ Setup complete! You can now run:"
echo ""
echo " python agent.py \"Go to google.com\" # Run a task"
echo ""