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

pqm-cli

v1.0.0

Published

Package Quality Monitor CLI - 文件监控、构建、发布一体化工具

Downloads

121

Readme

PQM CLI

Package Quality Monitor CLI - 文件监控、构建、发布一体化工具。

安装

cd pqm-cli
npm install
npm link

流程闭环

┌─────────────────────────────────────────────────────────────┐
│                      PQM 完整工作流                            │
├─────────────────────────────────────────────────────────────┤
│                                                               │
│  开发阶段          发布阶段                │
│  ┌───────┐         ┌─────────┐        ┌─────────┐           │
│  │ watch │ ──────▶ │ commit  │ ─────▶ │ release │           │
│  └───────┘         └─────────┘        └─────────┘           │
│      │                  │                  │                 │
│      ▼                  ▼                  ▼                 │
│  ┌───────┐         ┌─────────┐        ┌─────────┐           │
│  │ build │         │ status  │        │ publish │           │
│  └───────┘         └─────────┘        └─────────┘           │
│                                           │                   │
│                                           ▼                   │
│                                     ┌─────────┐              │
│                                     │ webhook │ ◀── Git Tag │
│                                     └─────────┘              │
│                                           │                   │
│                                           ▼                   │
│                                        npm 发布               │
└─────────────────────────────────────────────────────────────┘

命令总览

开发流程

# 1. 初始化项目
pqm init

# 2. 启动文件监控(自动构建)
pqm watch

# 3. 查看项目状态
pqm status

提交发布

# 4. 提交代码
pqm commit "feat: 新功能"

# 5. 创建发布版本
pqm release patch   # 1.0.0 → 1.0.1
pqm release minor   # 1.0.0 → 1.1.0
pqm release major   # 1.0.0 → 2.0.0

# 6. 发布到 npm
pqm login           # 登录 npm
pqm publish         # 发布包

Webhook 自动发布

# 启动 webhook 服务器
pqm webhook start

# 在另一个终端测试
pqm webhook test

命令详情

pqm watch

启动文件监控,自动触发构建。

pqm watch                    # 监控 ./src
pqm watch -p ./lib          # 监控 ./lib
pqm watch -t vite           # 指定构建工具
pqm watch --webhook         # 同时启动 webhook

pqm commit

提交并推送代码。

pqm commit "feat: 添加新功能"
pqm commit "fix: 修复bug" -m "详细说明"

pqm release

创建版本发布。

pqm release          # 默认 patch
pqm release patch    # 补丁版本 1.0.0 → 1.0.1
pqm release minor    # 次要版本 1.0.0 → 1.1.0
pqm release major    # 主要版本 1.0.0 → 2.0.0

pqm publish

发布到 npm。

pqm publish                  # 交互式发布
pqm publish --access public  # 公开包
pqm publish --skip-test      # 跳过测试
pqm publish --skip-build     # 跳过构建

pqm webhook

自动发布 webhook 服务器。

# 设置 NPM_TOKEN 环境变量
export NPM_TOKEN=npm_xxxxx

# 启动服务器
pqm webhook start

# 指定端口
pqm webhook start -p 3200

# 启用签名验证
pqm webhook start -s your-secret

# 测试 webhook
pqm webhook test

pqm status

查看项目状态。

pqm status

输出示例:

📦 包信息
────────────────────────────────
名称: my-package
版本: v1.0.0

🌿 Git 状态
────────────────────────────────
分支: main
变更: 工作区干净

📝 最近提交
────────────────────────────────
  abc1234 feat: 新功能
  def5678 fix: 修复bug

🔐 NPM 状态
────────────────────────────────
用户: your-username

其他命令

pqm init              # 初始化配置
pqm config list       # 查看配置
pqm config set <k> <v>  # 设置配置
pqm doctor            # 环境诊断
pqm build             # 手动构建
pqm build -t vite     # 指定工具
pqm login             # NPM 登录

配置文件 (.pqmrc)

{
  "root": "./src",
  "exclude": ["node_modules", "dist", ".git"],
  "buildTool": "auto",
  "buildMode": "incremental",
  "buildOnStart": true,
  "webhook": {
    "enabled": false,
    "port": 3200
  },
  "log": {
    "level": "info",
    "file": ".pqm/pqm.log"
  }
}

典型工作流

场景 1:日常开发

# 1. 开始开发
pqm watch

# 2. 修改文件...(自动构建)

# 3. 提交
pqm commit "feat: 添加新功能"

# 4. 发布版本
pqm release patch

场景 2:CI/CD 自动发布

# 服务器端运行
export NPM_TOKEN=npm_xxxxx
pqm webhook start -p 3000

# 配置 Git 平台 Webhook:
# URL: http://your-server:3000/webhook/npm-publish
# 触发: Tag push

场景 3:手动发布

pqm status           # 检查状态
pqm login            # 登录
pqm release minor    # 创建版本
pqm publish          # 发布

依赖

  • Node.js >= 18
  • Git
  • npm

License

MIT