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

chao-generator-cli

v1.1.2

Published

一个简单的项目脚手架工具

Readme

chao-cli

一个基于 Node.js 的自定义前端项目脚手架工具,支持从 GitHub 远程模板快速创建项目。

功能特性

  • 交互式选择项目模板
  • 通过命令行参数直接指定模板
  • 自动克隆远程 GitHub 仓库(浅克隆,自动清理 .git 历史)
  • 自定义项目信息(名称、关键词、描述、作者)并写入 package.json
  • 自动安装项目依赖
  • 同名目录冲突检测与处理
  • 查看所有可用模板列表
  • 项目名安全校验(白名单机制,防止命令注入)
  • Git clone 超时保护(60 秒)

环境要求

  • Node.js >= 18
  • Git

安装

# 全局安装
npm install -g chao-generator-cli

# 或本地开发
git clone <repo-url>
cd chao-generator-cli
npm install
npm link

使用

创建项目

# 交互式创建(会弹出模板选择列表)
chao-cli create my-app

# 指定模板创建
chao-cli create my-app -t vite-template

# 强制覆盖已存在的同名目录
chao-cli create my-app -f

# 跳过项目信息录入
chao-cli create my-app -i

查看可用模板

chao-cli list

查看版本

chao-cli -v

查看帮助

chao-cli --help
chao-cli create --help

可用模板

| 模板名称 | 仓库地址 | 描述 | |---------|---------|------| | webpack-template | yingside/webpack-template | 基于 webpack5 自定义初始化 Vue3 项目模板 | | vue-admin-box | cmdparkour/vue-admin-box | 基于 vue3 的 admin-box 模板 | | vite-template | yingside/vite-template | 基于 vite3 自定义初始化 Vue3 项目模板 + 前端工具链模板 | | vite-templates | wuhujiang/vue3-template | 基于 vite3 自定义初始化 Vue3 项目模板 |

命令参数

create <app-name>

| 参数 | 说明 | |------|------| | -t, --template [template] | 指定模板名称创建项目 | | -f, --force | 强制覆盖已存在的同名目录 | | -i, --ignore | 跳过项目信息录入,直接使用模板默认配置 |

项目名规则

项目名只能包含字母、数字、下划线、中划线和点号,且不能以点号或中划线开头。

发布

需在 Git Bash 中执行:

npm run release

发布脚本会:

  1. 提示输入版本号
  2. 自动提交未保存的更改
  3. 更新 package.json 版本号
  4. 推送代码和 tag 到远程仓库
  5. 发布到 npm

技术栈

License

ISC