-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.py
More file actions
55 lines (46 loc) · 1.82 KB
/
install.py
File metadata and controls
55 lines (46 loc) · 1.82 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
#!/usr/bin/env python3
"""
Quick installation script for Playwright AI Browser.
"""
import subprocess
import sys
import os
from pathlib import Path
def main():
"""Main installation function."""
print("🚀 Installing Playwright AI Browser...")
# Check Python version
if sys.version_info < (3, 10):
print("❌ Python 3.10 or higher is required")
sys.exit(1)
# Install Python dependencies
print("📦 Installing Python dependencies...")
try:
subprocess.run([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"], check=True)
print("✅ Python dependencies installed")
except subprocess.CalledProcessError:
print("❌ Failed to install Python dependencies")
sys.exit(1)
# Install Playwright browsers
print("🌐 Installing Playwright browsers...")
try:
subprocess.run([sys.executable, "-m", "playwright", "install"], check=True)
print("✅ Playwright browsers installed")
except subprocess.CalledProcessError:
print("❌ Failed to install Playwright browsers")
sys.exit(1)
# Install Claude Code CLI
print("🤖 Installing Claude Code CLI...")
try:
subprocess.run(["npm", "install", "-g", "@anthropic-ai/claude-code"], check=True)
print("✅ Claude Code CLI installed")
except subprocess.CalledProcessError:
print("⚠️ Failed to install Claude Code CLI. Please install manually:")
print(" npm install -g @anthropic-ai/claude-code")
print("\n🎉 Installation completed!")
print("\nNext steps:")
print("1. Set your Claude API key: export CLAUDE_API_KEY='your-key-here'")
print("2. Run the demo: python examples/demo.py")
print("3. Or use the CLI: python -m src.main https://example.com")
if __name__ == "__main__":
main()