forked from ZRainbow1275/AutoTeam-F
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·37 lines (30 loc) · 865 Bytes
/
setup.sh
File metadata and controls
executable file
·37 lines (30 loc) · 865 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
35
36
37
#!/bin/bash
set -e
# 安装系统依赖(xvfb,无头服务器需要)
if ! command -v Xvfb &> /dev/null; then
echo "安装 xvfb..."
sudo apt-get update && sudo apt-get install -y xvfb
fi
# 安装 uv(如果没有)
if ! command -v uv &> /dev/null; then
echo "安装 uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
# 安装 Python 依赖
uv sync
# 安装 Playwright 浏览器
uv run playwright install chromium
# 安装 pre-commit hooks
uv run pre-commit install
# 复制配置模板
if [ ! -f .env ]; then
cp .env.example .env
echo "⚠️ 已创建 .env,请填入实际配置"
fi
echo ""
echo "✅ 安装完成!"
echo ""
echo "用法:"
echo " uv run autoteam --help # 查看所有命令"
echo " uv run autoteam rotate # 智能轮转"
echo " uv run autoteam api # 启动 API + Web 面板"