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

create-gitee

v1.0.11

Published

快速初始化Git仓库并推送到Gitee的工具

Readme

create-gitee

License

create-gitee 是一个命令行工具,用于快速初始化 Git 仓库并推送到 Gitee(码云)。通过简单的交互式提示,您可以完成从初始化 Git 仓库到推送代码的所有步骤。

功能特性

  • 自动生成 .gitignore 文件(如果不存在)。
  • 支持交互式初始化 Git 仓库 (git init)。
  • 支持交互式将文件添加到暂存区 (git add .)。
  • 支持交互式提交代码 (git commit)。
  • 支持设置远程仓库地址 (git remote add origin)。
  • 支持将代码推送到指定分支 (git push -u origin <branch>)。
  • 提供友好的命令行提示和错误处理。
  • 跨平台支持:自动检测操作系统并生成适用于 Windows(PowerShell)和 Unix/Linux 的 Git 命令。
  • 直接执行支持:通过 npm init giteenpm create gitee 直接运行工具。

安装与使用

直接执行

npm init gitee

npm create gitee

使用说明

运行工具后,按照提示完成以下步骤:

  1. 初始化 Git 仓库
    工具会询问是否执行 git init。输入 yyes 确认。

  2. 将文件添加到暂存区
    工具会询问是否执行 git add .。输入 yyes 确认。

  3. 提交代码
    输入提交信息,默认值为 Initial commit

  4. 设置远程仓库地址
    输入您的 Gitee 仓库地址。

  5. 设置分支名称
    输入目标分支名称,默认值为 main

  6. 推送代码
    工具会询问是否执行 git push。输入 yyes 确认。

完成后,工具将显示成功消息并退出。

示例

$ npm init gitee
欢迎使用create-gitee - 快速初始化Git仓库并推送到Gitee

已创建.gitignore文件
是否执行git init? (默认: y): y
git init 执行成功
是否执行git add .? (默认: y): y
git add . 执行成功
请输入commit备注信息 (默认: Initial commit): First commit
git commit 执行成功
请输入Git仓库地址: https://gitee.com/your-repo.git
请输入分支名称 (默认: main): main
git remote 添加成功
是否执行git push到main分支? (默认: y): y
git push 到main分支成功

操作完成!

跨平台支持

工具会自动检测操作系统并生成适合的 Git 命令:

  • Windows:使用 PowerShell 命令。
  • 非 Windows:使用 Unix/Linux Shell 命令。

例如,以下脚本被添加到 package.json 中:

"scripts": {
  "git": "powershell -Command \"$msg = Read-Host 'Enter commit message'; git add .; git commit -m \\\"$msg\\\"; git push\""
}