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

yc-studio-cli

v1.0.5

Published

洋铲工作室项目脚手架工具,用于快速初始化Vue3和全栈项目模板

Downloads

27

Readme

yc-studio-cli

洋铲工作室项目脚手架工具,用于快速初始化 Vue3 单页应用 或 Vue3 + Spring Boot 全栈 项目模板。

环境要求

  • Node.js >= 14.0.0(推荐 18 LTS 或更高)
  • 使用 fullstack 模板时,还需本地安装:
    • JDK 17+(后端 Spring Boot 3)
    • Maven 3.6+
    • MySQL 5.7+ / 8.x(后端默认自动建库,见模板说明)

安装

全局安装(推荐)

安装后可在任意目录直接使用 yc-studio-cli 命令:

npm install -g yc-studio-cli

验证是否安装成功:

yc-studio-cli -V
yc-studio-cli -h

升级到新版本:

npm update -g yc-studio-cli

卸载:

npm uninstall -g yc-studio-cli

从源码安装(参与开发)

适用于修改 CLI 源码或尚未发布到 npm 时:

git clone <repository-url>
cd yc-studio-cli
npm install
npm link

npm link 会在全局注册 yc-studio-cli 命令,效果与全局安装类似,但指向本地源码。

不安装,临时使用

若已发布到 npm,也可通过 npx 单次执行(无需全局安装):

npx yc-studio-cli init my-project
npx yc-studio-cli list

快速开始

# 查看所有可用模板
yc-studio-cli list

# 初始化 Vue3 项目(默认模板)
yc-studio-cli init my-vue-app

# 初始化全栈项目(前端 + 后端)
yc-studio-cli init my-app -t fullstack

使用说明

命令一览

| 命令 | 说明 | |------|------| | yc-studio-cli -h | 显示帮助信息(含示例与模板摘要) | | yc-studio-cli -V | 显示当前 CLI 版本 | | yc-studio-cli list | 查看所有可用模板及技术栈、特性说明 | | yc-studio-cli init <project-name> [options] | 下载模板并初始化项目 |

初始化项目

Vue3 模板(默认)

yc-studio-cli init my-project
# 或显式指定
yc-studio-cli init my-project -t vue3

下载完成后,按提示填写 package.json 中的项目名称、作者、简介等信息。

全栈模板(前端 + 后端)

yc-studio-cli init my-project -t fullstack

下载完成后,按提示输入:

| 提示项 | 说明 | 默认值示例(项目名为 my-app) | |--------|------|--------------------------------| | 前端项目名称 | 前端子目录名 | my-app-web | | 后端项目名称 | 后端子目录名 | my-app-server | | Java 包名 | 后端包路径 com.{packageName},仅小写字母与数字 | myapp | | MySQL 数据库名称 | 库名、JDBC 默认库、初始化 SQL 脚本名 | my-app(kebab-case) | | 作者名称 | 项目作者 | 留空则使用「洋铲工作室」 | | 项目简介 | 项目描述 | 留空则使用默认文案 |

注意:Java 包名须符合规范(如 myapp),勿使用连字符或保留字。数据库名可与包名不同(如库名 my-app-db、包名 myapp)。

生成目录结构示例:

my-app/
├── my-app-web/                    # 前端(Vue3 + Vite)
└── my-app-server/                 # 后端(Spring Boot)
    └── src/main/java/com/myapp/   # 包名已替换

命令选项

| 选项 | 简写 | 描述 | 默认值 | |------|------|------|--------| | --template | -t | 模板名称:vue3 | fullstack | vue3 | | --help | -h | 显示帮助信息 | - | | --version | -V | 显示版本号 | - |

子命令 init 也支持 -h,可查看该命令的示例与模板说明:

yc-studio-cli init -h

可用模板

| 模板名 | 描述 | 技术栈 | 适用场景 | |--------|------|--------|----------| | vue3 | Vue3 单页应用项目模板 | Vue3 · TypeScript · Vite · Element Plus · Pinia | 纯前端、管理后台、H5 | | fullstack | 全栈项目模板(前端 + 后端) | Vue3 · Spring Boot 3 · MySQL · Redis(可选) | 企业管理系统、中后台全栈项目 |

模板仓库:

  • vue3:GitHub vue3-project-template
  • fullstack:Gitee yc-project-template

执行 yc-studio-cli list 可查看更详细的特性与仓库地址。

全栈模板说明

前端({project}-web)

  • Vue3 + TypeScript + Vite
  • Element Plus、Pinia、Vue Router 动态路由
  • 低代码平台集成(sky-render)
  • RBAC 权限体系
  • 开发默认:http://localhost:3200,/api 代理到后端 8095

后端({project}-server)

  • Spring Boot 3.2.5、Spring Data JPA
  • JWT 认证、MySQL、可选 Redis
  • 文件上传、低代码平台服务端代理
  • 开发默认:http://localhost:8095/api
  • 首次启动可自动创建数据库并执行初始化 SQL(可配置关闭)

自动替换项

使用 fullstack 初始化时,CLI 会自动替换:

  • 前端、后端子目录名称
  • Java 包名(com.ycproject → com.{packageName})
  • application.yml 中配置前缀、应用名、环境变量名
  • MySQL 数据库名(可与 Java 包名不同)、初始化脚本文件名
  • pom.xml 中的项目信息
  • 作者、简介等文案

初始化后建议操作

# 后端
cd my-app-server
# 配置 application-local.yml 中的数据库账号密码
mvn spring-boot:run

# 前端(新终端)
cd my-app-web
npm install
npm run dev

默认管理员账号等信息见后端模板 README.md(部署前请务必修改默认密码与 JWT 密钥)。

常见问题

Q:yc-studio-cli: command not found

  • 确认已执行 npm install -g yc-studio-cli
  • 检查 npm 全局 bin 目录是否在 PATH 中:npm config get prefix

Q:下载模板失败

  • 确认网络可访问 GitHub(vue3)或 Gitee(fullstack)
  • 公司网络可能需要配置代理

Q:目标目录已存在

  • 请使用空目录名,或先删除/重命名已有目录后再执行 init

Q:全栈项目后端启动失败

  • 确认 JDK 17+、MySQL 已启动
  • 检查 application-local.yml 中数据源配置
  • Java 包名是否合法(仅小写字母与数字,且不以数字开头)

本地开发 CLI

git clone <repository-url>
cd yc-studio-cli
npm install

# 直接运行(不全局安装)
node index.js list
node index.js init my-project -t fullstack

License

ISC