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

gen-tag-version

v1.1.2

Published

命令行工具,用于管理git版本标签,支持测试和生产环境

Downloads

4

Readme

gen-tag-version

|这个项目的 code 完全由 AI 生成的

一个命令行工具,用于管理git版本标签,支持测试和生产环境。

功能特性

  • 🔍 查询当前git仓库的版本标签
  • 🏷️ 支持测试环境(tag以 test- 开头)和生产环境(tag以 prod- 开头)
  • 📈 自动版本号递增(patch/minor/major)
  • 🎯 交互式命令行界面
  • ⚡ 快速创建新版本标签

安装

全局安装

pnpm install -g gen-tag-version

本地开发

# 克隆项目
git clone <repository-url>
cd gen-tag-version

# 安装依赖
pnpm install

# 构建项目
pnpm run build

# 运行
pnpm start

使用方法

# 基本使用
gentag

# 或者使用npx
npx gentag

使用流程

  1. 选择环境:选择要查询的环境(测试环境或生产环境)
  2. 查询版本:工具会自动查询并显示最新的版本号
  3. 确认操作:选择是否要生成新版本
  4. 选择版本类型:如果生成新版本,选择版本递增类型(patch/minor/major)
  5. 完成:工具会自动创建新的git标签

版本格式

  • 测试环境:以test-开头,如test-v0.0.178
  • 生产环境:以prod-开头,如prod-v0.0.178

版本递增规则

  • patch:修复版本,如 v0.0.178v0.0.179
  • minor:功能版本,如 v0.0.178v0.1.0
  • major:主版本,如 v0.0.178v1.0.0

开发

项目结构

src/
├── types.ts      # 类型定义
├── git.ts        # Git操作封装
├── version.ts    # 版本解析和管理
├── cli.ts        # 命令行交互逻辑
└── index.ts      # 程序入口点

构建

pnpm run build

开发模式

pnpm run dev

技术栈

  • TypeScript
  • Node.js
  • @clack/prompts (交互式命令行界面)
  • cac (命令行参数解析)
  • unbuild (构建工具)