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

nh-ai-cli

v1.0.4

Published

基础模板脚手架

Readme

前端脚手架工具 (Frontend Scaffold CLI)

🚀 一个功能丰富的前端脚手架工具,支持多种模板选择和网络检测,让您快速创建前端项目。

✨ 特性

  • 🌐 网络检测: 自动检测网络连接状态,确保模板下载成功
  • 📋 多模板支持: 支持 React、Vue、Next.js、Nuxt.js 等多种主流框架
  • 🎯 交互式选择: 友好的命令行交互界面,轻松选择项目模板
  • 快速生成: 一键生成项目结构并自动安装依赖
  • 📦 npm 发布: 支持发布到 npm,全局安装使用
  • 🔧 灵活配置: 支持命令行参数和交互式两种使用方式

🛠️ 支持的模板

| 模板名称 | 描述 | 技术栈 | |---------|------|--------| | kjl-miniapp | React + Vite + TypeScript | React 18, Vite, TypeScript, ESLint, Prettier | | admin-base | Vue 3 + Vite + TypeScript | Vue 3, Vite, TypeScript, ESLint, Prettier |

📦 安装

全局安装 (推荐)

npm install -g nh-ai-cli

本地安装

npm install nh-ai-cli

🚀 使用方法

交互式模式 (推荐)

nac
# 或者
nh-ai-cli

命令行模式

nac -t react-vite -n my-project -p ./projects

参数说明

  • -t, --template <template>: 指定模板名称
  • -n, --name <name>: 指定项目名称
  • -p, --path <path>: 指定项目路径 (默认为当前目录)

📋 使用示例

1. 交互式创建项目

$ nac

🚀 前端脚手架工具 v1.0.0
快速创建前端项目的最佳选择

✅ 网络连接正常

? 请选择项目模板: (Use arrow keys)
❯ kjl-miniapp - React + Vite + TypeScript
  admin-base - Vue 3 + Vite + TypeScript

? 请输入项目名称: my-awesome-project
? 请输入项目路径: /Users/username/projects

正在下载模板 kjl-miniapp...
✅ 模板 kjl-miniapp 下载完成
✅ 依赖安装完成

🎉 项目创建成功!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 项目信息:
   名称: my-awesome-project
   路径: /Users/username/projects/my-awesome-project
   模板: kjl-miniapp
   描述: React + Vite + TypeScript

🚀 下一步操作:
   cd my-awesome-project
   npm run dev
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✨ 开始您的开发之旅吧!

2. 命令行模式

# 创建 React + Vite 项目
nac -t react-vite -n my-react-app

🔧 开发

本地开发

# 克隆项目
git clone https://github.com/your-username/frontend-scaffold-cli.git
cd frontend-scaffold-cli

# 安装依赖
npm install

# 运行测试
npm start

发布到 npm

# 构建项目
npm run build

# 发布到 npm
npm publish

📁 项目结构

frontend-scaffold-cli/
├── bin/
│   └── index.js          # 主入口文件
├── lib/
│   ├── network.js        # 网络检测模块
│   ├── templates.js      # 模板管理模块
│   └── generator.js      # 项目生成模块
├── package.json          # 项目配置
├── .npmignore           # npm 忽略文件
├── .gitignore           # git 忽略文件
├── LICENSE              # 许可证
└── README.md            # 说明文档

🤝 贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建您的特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交您的更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 打开一个 Pull Request

📄 许可证

本项目基于 MIT 许可证开源 - 查看 LICENSE 文件了解详情。

🙏 致谢

感谢以下开源项目的支持:

📞 联系方式

如有问题或建议,请通过以下方式联系:


⭐ 如果这个项目对您有帮助,请给它一个星标!