Scaffold project with pyproject.toml and environment configuration Implement core modules including CLI, Gemini integration, and scanner
53 lines
1.6 KiB
Markdown
53 lines
1.6 KiB
Markdown
# UiPath Explainator
|
||
|
||
`uipath-explainator` 会按 UiPath 项目入口 `main.xaml` 递归提取 `Invoke Workflow` 和 `Invoke VBA`,复制到指定工作区,删除 `<ui:CommentOut>` 里的无效代码,再重新扫描并裁掉不再使用的文件,最后逐个调用 Gemini 生成说明文档。
|
||
|
||
## 安装
|
||
|
||
```bash
|
||
./.venv/bin/pip install -e .
|
||
```
|
||
|
||
## 配置
|
||
|
||
把 `.env.example` 复制成 `.env`,至少填入:
|
||
|
||
```env
|
||
GEMINI_API_KEY=your_api_key
|
||
GEMINI_BASE_URL=
|
||
GEMINI_MODEL=gemini-2.5-flash
|
||
```
|
||
|
||
`GEMINI_BASE_URL` 留空时走官方默认地址;如果你前面挂了代理或网关,可以填自定义地址。
|
||
|
||
## 使用
|
||
|
||
```bash
|
||
./.venv/bin/python -m uipath_explainator \
|
||
/path/to/uipath-project \
|
||
--output-dir workspace/project-copy \
|
||
--force
|
||
```
|
||
|
||
常用参数:
|
||
|
||
- `--entry`: 入口文件名,默认 `main.xaml`
|
||
- `--env-file`: 自定义 `.env` 路径
|
||
- `--model`: 临时覆盖 `.env` 里的模型名
|
||
- `--skip-analysis`: 只做复制、清理和剪枝,不调用 Gemini
|
||
- `--force`: 允许覆盖已有输出目录
|
||
|
||
## 输出内容
|
||
|
||
输出目录会保留原项目的相对目录结构,并额外生成:
|
||
|
||
- `manifest.json`: 扫描、剪枝、告警和分析结果清单
|
||
- `OVERVIEW.md`: 总览摘要
|
||
- `*.analysis.md`: 每个最终保留文件对应的 Gemini 说明
|
||
|
||
## 当前实现约束
|
||
|
||
- 只解析能静态识别出来的 `Invoke Workflow` / `Invoke VBA` 文件路径。
|
||
- 对动态拼接路径会记录 warning,但不会猜测。
|
||
- `Invoke VBA` 默认识别常见文本型 VBA 文件扩展名:`.txt`、`.bas`、`.vb`、`.vbs`、`.vba`、`.cls`、`.frm`。
|