CLI tool for automatic code bug fixing powered by LLMs
Project description
AgentCrops
基于 LLM 的 AI 软件工程工具,支持自动代码修复、扫描、设计、开发、测试全流程。提供 CLI 命令行和 TUI 终端界面两种使用方式。
安装
pip install agentcrops
或从源码安装:
git clone <repo-url> AgentCrops
cd AgentCrops
pip install -e ".[dev]"
需要 Python >= 3.11。
快速开始
# 设置 API Key
export ANTHROPIC_API_KEY="sk-ant-..."
# 修复单个文件中的 bug
agentcrops fix src/app.py
# 扫描目录中的潜在问题
agentcrops scan src/
CLI 命令
| 命令 | 说明 |
|---|---|
agentcrops fix <文件> |
分析并修复文件中的 bug(多 Agent 协作) |
agentcrops scan [目录] |
扫描目录中的潜在 bug |
agentcrops design <需求.md> |
根据需求生成架构设计文档 |
agentcrops develop <需求.md> |
根据需求生成可运行代码 |
agentcrops test <目标> |
为指定代码编写并运行测试 |
agentcrops build <需求.md> |
运行完整构建流水线(设计→开发→测试) |
agentcrops serve |
启动 HTTP API 服务(供 TUI 使用) |
agentcrops config show |
查看当前配置 |
agentcrops config get <键> |
获取指定配置项 |
agentcrops config set <键> <值> |
设置配置项(仅运行时) |
agentcrops skill list |
列出已注册技能 |
agentcrops kb list |
列出知识库适配器 |
TUI 终端界面(actui)
除了 CLI 命令行,AgentCrops 还提供了一个 Ink/React 构建的终端 UI,支持多 Agent 协作的可视化操作。
启动
# 方式 1:一键启动脚本(推荐)
./actui.sh
# 方式 2:手动分别启动
# 终端 1 — 启动后端服务
agentcrops serve
# 终端 2 — 启动 TUI
cd src/actui && npm run dev
功能
- 多 Tab 切换 — 同时与多个 Agent(Leader / Architect / Coder / Tester / Reviewer)对话
- 实时 SSE 流 — Agent 回复逐字显示,支持 tool call 可视化
- 命令面板 — 输入
/fix、/scan、/build等命令直接触发工作流 - 团队面板 — 侧边栏实时显示各 Agent 状态和任务进度
- 键盘快捷键 —
Ctrl+C退出,Alt+1~9切换 Tab,Ctrl+B切换侧边栏
连接自定义服务端
默认连接 http://localhost:8730,可通过环境变量修改:
ACTUI_SERVER_URL=http://192.168.1.100:8730 npm run dev
核心特性
- 多 Agent 组队 — Leader 协调 + Architect / Coder / Tester / Reviewer 分工协作
- 多后端支持 — Claude Agent SDK、Cursor SDK 或任意 OpenAI 兼容 API
- 工具调用 — Agent 可读写文件、执行 shell、操作 git、运行测试
- 技能系统 — 可插拔分析模块(静态分析、测试生成等)
- 知识库 — 绑定团队文档、编码规范和 bug 历史以提升修复质量
- 安全保护 — Shell 沙箱、文件访问边界控制、API Key 脱敏、自动备份
配置
AgentCrops 使用 .agentcrops.toml 配置文件,优先级从高到低:
环境变量 (最高)
↓
项目 .agentcrops.toml
↓
用户 ~/.agentcrops/config.toml
↓
内置默认值 (最低)
详细配置参考见 docs/usage-guide.md。
文档
License
MIT — 详见 LICENSE。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentcrops-0.1.0.tar.gz.
File metadata
- Download URL: agentcrops-0.1.0.tar.gz
- Upload date:
- Size: 4.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8caf3cbe8934c91b69b9803f5a80cda9484b01bf1f7ba411989f23703a16ec85
|
|
| MD5 |
38a029c089ccf780b02b52dbb97ee114
|
|
| BLAKE2b-256 |
1be1e62ad6edae05319348921c77c2c20747c459f39b1f5428893e3499a7a1c5
|
File details
Details for the file agentcrops-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentcrops-0.1.0-py3-none-any.whl
- Upload date:
- Size: 174.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c6f1d1fcb1f6f2258f24f6f820eb06dc93015817270345a0a315f774bdab84f
|
|
| MD5 |
fd58ef3b2e492ed62c9d028034191d76
|
|
| BLAKE2b-256 |
75aa37a7f0fa167acd07b368e9488556da138100490f30546ac33c80057dccb3
|