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 🙏

© 2025 – Pkg Stats / Ryan Hefner

acw-scaffold

v1.0.9

Published

Common Admin & Tiny Boot 项目脚手架生成工具

Readme

ACW Scaffold

Common Admin & Tiny Boot 项目脚手架生成工具

一个用于快速生成 Java Spring Boot 项目的命令行脚手架工具。

功能特性

  • 🚀 支持 Spring Boot 2.x 和 3.x 两个版本
  • 📦 支持多种部署模式(目前支持单体+单体模式)
  • 🎯 交互式配置收集
  • 🔧 自动克隆项目模板仓库并配置
  • ⚡ 自动检查并更新到最新版本
  • 📝 详细的进度提示

前置要求

  1. Node.js:版本 >= 16.x
  2. Git:需要配置 SSH 密钥
  3. 阿里云 VPN:必须连接到阿里云 VPN 才能访问代码仓库
  4. 网络访问:确保可以访问 GitLab 仓库

安装

全局安装(推荐)

npm install -g acw-scaffold

本地开发

# 克隆仓库
git clone <repository-url>
cd acw-scaffold

# 安装依赖
npm install

使用方法

全局安装后

# 使用 tinyadmin 命令(推荐)
tinyadmin

# 或使用 acw-scaffold 命令
acw-scaffold

# 或使用 scaffold 命令
scaffold

本地开发

# 运行脚手架工具
npm start

# 或者直接运行
node index.js

自动更新

工具会在每次运行时自动检查是否有新版本可用:

  • 如果有新版本,会提示您是否立即更新
  • 可以选择跳过更新,使用当前版本
  • 也可以手动更新:npm install -g acw-scaffold@latest

使用流程

1. VPN 连接提示

启动工具后,首先会提示确保已连接阿里云 VPN。

2. 选择技术栈版本

  • Spring Boot 2.x(推荐):JDK 1.8 + Common Admin 2.x + Tiny Boot 2.x
  • Spring Boot 3.x:JDK 21 + Common Admin 3.x + Tiny Boot 3.x

3. 选择部署模式

  • 模式1:单体+单体(已支持):适用于小型项目
  • 模式2:单体+分布式(暂不支持):适用于中型项目
  • 模式3:微应用+分布式(暂不支持):适用于大型项目

4. 输入项目配置

基础配置

  • 项目名称:只能包含小写字母、数字和连字符
  • 包名:Java 包名格式,如 com.example.project
  • 服务端口:默认 8082

数据库配置

  • 数据库类型:MySQL / PostgreSQL / Oracle
  • 数据库主机:默认 localhost
  • 数据库端口:根据类型自动设置
  • 数据库名
  • 数据库用户名
  • 数据库密码

Redis 配置

  • Redis 主机:默认 localhost
  • Redis 端口:默认 6379
  • Redis 密码:可选

5. 确认配置

工具会显示所有配置的摘要,确认后开始生成项目。

6. 项目生成

  • 在当前目录创建项目文件夹
  • 克隆对应的代码仓库(模式1 使用 SSH 克隆)
  • 显示生成结果和后续步骤

示例输出

╔══════════════════════════════════════════════════════════╗
║         Java 项目脚手架生成工具 v1.0.0                  ║
╚══════════════════════════════════════════════════════════╝

⚠️  重要提示:
   请确保已经连接到阿里云 VPN,否则可能无法克隆代码仓库!

> 请选择技术栈版本: Spring Boot 2.x (JDK 1.8 + Common Admin 2.x + Tiny Boot 2.x) 【推荐】
✓ 已选择:Spring Boot 2.x

> 请选择部署模式: 模式1:单体+单体(适用于小型项目)
✓ 已选择:模式1(单体+单体)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  项目基础配置
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

...

常见问题

1. 克隆仓库失败

可能原因:

  • 未连接阿里云 VPN
  • SSH 密钥未配置或配置错误
  • 无 GitLab 仓库访问权限

解决方法:

  1. 确保已连接阿里云 VPN
  2. 配置 SSH 密钥:ssh-keygen -t rsa -b 4096
  3. 将公钥添加到 GitLab:设置 → SSH Keys
  4. 测试连接:ssh -T [email protected]

2. 项目文件夹已存在

工具会检测同名文件夹,如果已存在会提示错误。请删除或重命名现有文件夹后重试。

3. 端口号验证失败

端口号必须在 1024-65535 之间。

技术栈

  • Node.js:运行环境
  • inquirer:命令行交互
  • chalk:终端输出美化
  • ora:进度提示动画

项目结构

node-ai-proj-starter/
├── index.js            # 主程序文件
├── package.json        # 项目配置文件
├── repositories.json   # 仓库地址配置文件
├── README.md           # 使用说明
├── USAGE.md            # 快速使用指南
├── flow.md             # 流程说明
└── .gitignore          # Git 忽略文件配置

配置说明

repositories.json

该文件存储不同部署模式和技术栈对应的 Git 仓库地址。格式如下:

{
  "mode1": {
    "name": "单体+单体",
    "description": "适用于小型项目",
    "repositories": {
      "springboot2": "[email protected]:kubeease/java/app-demo-single.git",
      "springboot3": "[email protected]:kubeease/java/app-demo-single.git"
    }
  }
}

如需修改仓库地址,直接编辑此文件即可,无需修改主程序代码。

后续开发计划

  • [ ] 支持模式2:单体+分布式
  • [ ] 支持模式3:微应用+分布式
  • [ ] 自动生成配置文件
  • [ ] 自动生成数据库脚本
  • [ ] Maven 编译验证
  • [ ] Docker 配置生成

许可证

MIT