构建 React 前端(必做)
Build the React frontend (required)
PyPI wheel 不包含 React 源码或构建产物;请先克隆仓库并使用 pip install -e '.[web]' 安装。
The PyPI wheel does not include the React source or build. Clone the repository and install with pip install -e '.[web]' first.
需要 Node.js 18+(含 npm)。在仓库根目录执行:
Requires Node.js 18+ (with npm). From the repository root:
# 0. 获取源码并安装 Web 依赖 git clone https://github.com/Netw0rkNoob/VulnClaw.git cd VulnClaw pip install -e '.[web]' # 1. 安装依赖并构建 cd frontend npm install npm run build # 2. 确认产物 # 应存在:<repo>/frontend/dist/index.html # 3. 重启 Web(另开终端,仓库根目录) # Ctrl+C 停掉当前 vulnclaw web,然后: vulnclaw web # 或:python -m vulnclaw.cli.main web # 4. 用终端打印的地址打开浏览器(含 ?token= 时完整复制)
# 0. Get the source and install Web dependencies git clone https://github.com/Netw0rkNoob/VulnClaw.git cd VulnClaw pip install -e '.[web]' # 1. Install deps and build cd frontend npm install npm run build # 2. Confirm output # Expect: <repo>/frontend/dist/index.html # 3. Restart the web server (repo root, second terminal) # Stop the current vulnclaw web process (Ctrl+C), then: vulnclaw web # or: python -m vulnclaw.cli.main web # 4. Open the printed URL in your browser (copy full ?token= if shown)
开发热更新可用 cd frontend && npm run dev(通常 :5173),
但生产路径仍是 vulnclaw web 静态托管 frontend/dist。
For live reload use cd frontend && npm run dev (usually :5173).
The production path remains vulnclaw web serving frontend/dist.