Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentcrops-0.2.1.tar.gz (5.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentcrops-0.2.1-py3-none-any.whl (186.2 kB view details)

Uploaded Python 3

File details

Details for the file agentcrops-0.2.1.tar.gz.

File metadata

  • Download URL: agentcrops-0.2.1.tar.gz
  • Upload date:
  • Size: 5.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for agentcrops-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0afdeaf74e97de44a419ab65352d0b95720fbbbdc9aa6c72a408025d069d86d1
MD5 469a066bf59a68803a591a98daa544aa
BLAKE2b-256 a14a9cb2faff58cc95f34b92feca683f41e145cc10a8a465d54907302f38cec8

See more details on using hashes here.

File details

Details for the file agentcrops-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agentcrops-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 186.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for agentcrops-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c32adf1d245d1ebf865029b46bea4292e4808ac98aae8c91776c40080ad8efb3
MD5 5e436f455f2154543cb0e3ce97549286
BLAKE2b-256 141e1d1e3f465a7774d27e3b8947e8d3ac56651b0a4e720e99c9b2764b14e0c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page