npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yorha2b-lab/autodev

v3.4.4

Published

基于视觉大模型的前端(react+Antd)全自动 CRUD 代码生成器

Downloads

3,369

Readme

Auto CRUD Copilot

English | 简体中文

Auto CRUD Copilot Banner

NPM Version NPM Downloads GitHub Stars License Total Clones

基于视觉大模型的前端(React+Antd)全自动 CRUD 代码生成器 🚀

Auto CRUD Copilot 2.0 Demo

💡 为什么选择 2.0 版本?

在 2.0 时代,我们放弃了繁琐的分散指令,全面进化为 “全频道集成指挥中心”

  • 全频道联动:不再需要开启多个进程。一个 watch 指令,同时监听 页面、组件、API 三大传感器。
  • 语义化骇入:不仅仅是复刻 UI,通过 9S 专用语义桥接协议,自动抹平前后端字段差异。
  • 工程级质量:生成的代码不是“演示用”,而是带 useTableQuery、EditableCell、OSS上传 等实战逻辑的高质量代码。

🛡️ 开源协议升级公告

[重要] 自 v2.1.0 起,本项目由 MIT 协议正式升级为 AGPL-3.0 协议。

💡 为什么要调整协议? 随着“地堡”系统的影响力扩大,我们希望确保本项目的核心技术能够始终保持开放与透明。采用 AGPL-3.0 旨在鼓励开发者在改进本工具的同时,能将这些优化回馈给社区,共同构建一个可持续进化的“前端自动化构筑”生态。

✅ 开发者友好声明 (重要): 我们深知开发者在实际业务场景中的合规需求。为了让地堡工具在商业环境中更安全、顺畅地运行,特此声明:

  1. 源码约束:AGPL-3.0 仅约束 AutoDev 工具自身的源代码
  2. 产出物豁免:使用本工具生成的所有代码、Mock数据及配置文件被视为 独立 作品,不具备 AGPL 的传染性特征。
  3. 商业兼容:您可以在商业项目、企业环境中使用本工具,且 无需 因此开源您的业务逻辑代码。

一句话总结:地堡的进化归属于社区,您构筑的战果归属于您自己。

✨ 特性

  • 🖼️ 视觉构筑 (Page): 截图丢入 screenShot,Pod 042 自动生成带 Table/Form/Tabs 的完整 CRUD 页面。
  • 🧩 碎片提取 (Part): 局部截图丢入 screenPart,终端瞬间弹出“即插即用”的 UI 配置片段。
  • 🔌 语义对齐 (API): 接口 JSON 丢入 response,自动修正前端字段名,达成前后端 100% 协议一致。
  • 🔧 智能装配: 自动补全 import 语句,处理日期格式转换、金额千分位、上传授权等所有脏活累活。
  • 📱 响应式: 生成的代码支持响应式布局

🚀 快速开始

安装

npm install -g @yorha2b-lab/autodev

环境配置

autodev init

💡 零配置快速体验 (模拟模式)

项目默认开启 Demo 模式:

  1. 无需配置 API_KEY,直接运行 autodev watch
  2. screenShot 目录丢入任意图片(系统将忽略图片内容,自动空投标准 example.json 构筑包)。
  3. 观察效果:你会看到命令行刷刷闪过,React 代码瞬间物理装配完成。 注:若想识别真实截图,请在 config.js 中将 useDemo 设为 false 并配置下方环境变量。

创建 .env 文件并配置以下环境变量:

# AI模型API配置
API_KEY=your_api_key_here
BASE_URL=your_api_base_url_here

🚗 获取API Key直通车: 阿里云百炼控制台

📖 指挥中心操作指南 (v2.0 工作流)

进入 2.0 时代,你只需要记住一个指令:

autodev watch

启动后,地堡系统将进入 全频道联动监听状态:

| 动作 | 目标目录 | 构筑效果 | | :--- | :--- | :--- | | 全页截图 | ./screenShot | 自动生成 index.jsresource.js 并同步路由配置 | | 局部截图 | ./screenPart | 终端实时打印代码片段 (随拷随用) | | 接口 JSON | ./response | 自动执行语义对齐,修正 resource.js 中的字段名 |

📁 2.0 地堡结构说明

your-project/
├── screenShot/          # 页面截图目录
├── screenPart/          # 组件截图目录
├── response/            # Response目录
├── mock/                # 生成的Mock数据
├── src/
│   ├── pages/           # 生成的页面代码
│   ├── components/      # 生成的组件代码
│   ├── hooks/           # 生成的Hook代码
└── config.js            # 配置文件

⚙️ 配置

config.js 中可以配置以下选项:

module.exports = {
    // 是否使用演示模式
    useDemo: true,
    // 是否需要生成 Mock 数据
    needMock: false,
    // 使用的 AI 模型类型
    visionModel: 'qwen3.5-plus',
    textModel: 'qwen-turbo',
    // 自定义模板目录
    // 如果为空,将使用内置模板
    // 自定义模板需要在hbsdir目录创建自己的index.hbs和resource.hbs文件
    hbsDir: '',
    // 目标项目的目录路径
    hooksDir: 'src/hooks',
    pagesDir: 'src/pages',
    utilsDir: 'src/utils',
    componentsDir: 'src/components',
}

🤝 贡献

欢迎贡献代码!请阅读 CONTRIBUTING.md 了解如何参与项目开发。

📄 许可证

本项目采用 GNU AGPL v3.0 许可证。

🙏 致谢

感谢以下开源项目为地堡提供核心动力:

📞 联系方式

如有问题或建议,欢迎提交 Issue

🛠️ 常见问题 (FAQ)

Q: 这个工具收费吗? A: 工具本身开源免费,但调用的 AI 模型(如 GPT-4v, Qwen-VL)可能需要你配置自己的 API Key。建议使用阿里云 Qwen-VL 等高性价比模型。

Q: 如何自定义生成的代码风格? A: 你可以配置 hbsDir 指向你自己的 Handlebars 模板目录,打造专属的地堡构筑规范。


⚖️ Disclaimer

Auto CRUD Copilot is a fan-made, non-commercial, open-source tool.

  • The themes, names (YoRHa, 2B, etc.), and catchphrases included in this project are inspired by NieR:Automata, which is a trademark and copyright of Square Enix Co., Ltd. / PlatinumGames Inc.
  • This project is not affiliated with, endorsed by, or representative of Square Enix in any way.
  • Please support the original masterpiece: NieR:Automata Official Site.

Glory to Mankind.

⭐ 如果这个项目对你有帮助,请给个Star支持一下!