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

@pubinfo-pr/cli

v0.238.1

Published

CLI for Pubinfo

Readme

@pubinfo/cli

Pubinfo 的命令行工具包,对外提供 pubinfo 命令。它负责把业务项目里的 pubinfo.config.ts 转成 Vite 可执行配置,并封装常用工程命令。

它在做什么

  • dev / build / preview: 先生成 .pubinfo/vite.config.ts,再转调 vite
  • setup: 初始化 .pubinfo/tsconfig.app.json
  • commit: 复用 @pubinfo/commitlint,提供统一的提交入口
  • generate: 在 monorepo 的 apps/ 下生成一个新应用
  • monorepo: 把现有单体项目迁移成 monorepo 结构
  • upgrade: 升级当前项目中的 pubinfo@pubinfo/module-* 依赖
  • icon: 批量规范化 SVG 图标尺寸和 viewBox

子命令

pubinfo dev
pubinfo build
pubinfo preview
pubinfo setup
pubinfo commit
pubinfo generate admin --openapi
pubinfo monorepo --app admin
pubinfo upgrade
pubinfo icon ./src/assets/icons --size 24

工作方式

这个包本身不维护一套独立的 Vite 配置文件,而是:

  1. 读取用户项目中的 pubinfo.config.ts
  2. .pubinfo/ 下生成临时 vite.config.ts
  3. 让 Vite 直接消费 pubinfoConfig.vite

因此它和 @pubinfo/vite 是配套设计的,前者负责“执行”,后者负责“生成配置”。

代码用法

import { main, runMain } from '@pubinfo/cli';

runMain();

仓库关系

  • pubinfo 包的可执行文件最终会导入这里。
  • generate / monorepo 子命令依赖 create-pubinfo 模板能力。
  • commit 子命令依赖 @pubinfo/commitlint