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

create-todo-cli

v1.2.137

Published

一个快速创建现代前端项目的模板生成工具,支持从多种流行框架和库的模板中选择(包括React、Vite、Electron、Nx工作区等),提供简单的交互式界面和命令行参数支持,帮助开发者快速初始化新项目或管理项目版本。

Downloads

76

Readme

create-todo-cli

一个功能强大的前端工具集,提供三大核心能力:从模板创建项目、从文件拆出独立项目、自动化版本发布,简化开发全流程。

🚀 核心功能

1️⃣ 从模板创建项目

  • 支持从GitHub仓库或本地项目快速创建新项目
  • 内置多种预设模板,包括TypeScript基础脚手架、Electron应用模板等
  • 交互式选择项目名称、模板类型和配置选项
  • 自动创建GitHub Actions发布配置

2️⃣ 从文件拆出独立项目

  • 将现有项目中的单个入口文件抽取为完整的npm包
  • 智能分析依赖并生成package.json
  • 自动构建JavaScript和TypeScript声明文件
  • 自定义输出目录名称,灵活适配不同项目结构

3️⃣ 自动化版本发布

  • 一键更新版本号并创建Git标签
  • 自动检查和提交未暂存的更改
  • 推送代码和标签到远程仓库
  • 与GitHub Actions集成,自动创建发布

📦 安装与使用

无需全局安装,直接通过包管理器的create命令使用:

# 使用pnpm(推荐)
pnpm create create-todo-cli

# 使用npm
npm create create-todo-cli

# 使用yarn
yarn create create-todo-cli

📋 详细使用指南

1. 从模板创建项目

直接指定项目名称:

# 创建名为my-app的项目
pnpm create create-todo-cli my-app

交互式创建:

pnpm create create-todo-cli
# 或使用create命令
pnpm create create-todo-cli create

创建流程:

  1. 输入项目名称(自动验证有效性)
  2. 选择模板类型(GitHub模板或本地项目)
  3. 如选择本地项目,通过文件浏览器选择项目路径
  4. 自动生成项目并配置

2. 从文件拆出独立项目

在需要拆出文件的项目目录下执行:

# 使用交互式模式
pnpm create create-todo-cli dist

拆包流程:

  1. 指定输出目录名称(默认为dist)
  2. 选择入口文件(支持.js, .ts, .jsx, .tsx等)
  3. 自动分析依赖并构建项目
  4. 生成包含JavaScript和TypeScript声明的独立包

3. 自动化版本发布

在项目根目录下执行:

# 发布新版本
pnpm create create-todo-cli release

发布流程:

  1. 自动递增版本号(patch级别)
  2. 创建带时间戳的唯一版本号
  3. 更新package.json并提交更改
  4. 创建Git标签
  5. 推送到远程仓库

⚙️ 支持的模板

  • 从本地项目抽取:从现有项目创建新模板
  • see7788/ts-template:TypeScript基础脚手架
  • see7788/electron-template:增强型Electron应用模板

🛠️ 系统要求

  • Node.js >= 18
  • Git(用于版本管理和模板克隆)
  • 任一支持的包管理器:pnpm、npm或yarn

🔧 核心依赖

  • degit:从Git仓库高效克隆模板
  • prompts:提供友好的交互式命令行界面
  • tsup:零配置TypeScript构建工具
  • esbuild:极速JavaScript/TypeScript打包

📁 项目结构

src/
├── index.ts           # 主入口,命令行参数处理
└── scripts/
    ├── template.ts    # 模板创建功能
    ├── dist.ts        # 文件抽取功能
    ├── release.ts     # 版本发布功能
    └── tool.ts        # 工具函数

💻 开发指南

如果您想参与项目开发:

# 克隆仓库
git clone https://github.com/see7788/create-todo-cli.git
cd create-todo-cli

# 安装依赖
pnpm install

# 构建项目
pnpm run build

# 本地测试
pnpm start

📄 许可证

MIT License © 2024 create-todo-cli 项目团队

🐛 问题反馈

如有任何问题或建议,请在 GitHub Issues 提交反馈。

🤝 贡献

欢迎提交Pull Request来改进本项目。请确保在提交前进行适当的测试。