Skip to content

Quick Start

CI Bot edited this page Aug 24, 2026 · 1 revision

快速开始

前置条件

  • Python 3.11 或更高版本
  • Node.js 18 或更高版本
  • Git、npm,以及可访问目标 GitLab 的网络
  • 用于接收和操作项目的 GitLab Bot PAT(至少 apiwrite_repository 权限)

本地启动

# 后端:创建环境并准备本地配置
cd backend
python3 -m venv .venv
.venv/bin/pip install -r requirements.lock.txt
cp config.example.yaml config.yaml
cp .env.example .env

# 编辑 .env:至少配置 GitLab 凭据、Webhook 密钥和执行引擎 API Key
.venv/bin/uvicorn botler.main:app --reload --host 0.0.0.0 --port 8000

在另一终端启动前端:

cd frontend
npm install
npm run dev

访问 http://localhost:5173,先在「仓库」页添加 GitLab 项目,再创建或选择一个已分配给 bot 的 Issue。

验证

curl http://localhost:8000/api/health
cd backend && .venv/bin/python -m pytest tests/ -q -n auto
cd frontend && npm test && npm run lint

更多配置请参阅配置参考,日常操作请参阅使用指南

Clone this wiki locally