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

@tanzerfe/cli

v0.0.6

Published

## 项目说明

Downloads

42

Readme

@tanzerfe/cli

项目说明

天泽智联前端项目的 CLI 工具,包含了一些常用的命令,如:清除 node_modulesdist 等目录,查看远程仓库所有分支,按照天泽智联的规范进行 Git 提交等。

开始使用

全局安装

npm install -g @tanzerfe/cli
  • 查看帮助
tz -h

使用此命令安装可以后续执行下面的命令自更新

tz su

项目中使用

pnpm add @tanzerfe/cli -D

如果项目中使用的不是 npm 包管理器 , 请手动维护更新版本。

项目中集成

安装依赖

pnpm add -D simple-git-hooks lint-staged @tanzerfe/cli

package.json 中添加如下配置

{
  "scripts": {
    "prepare": "simple-git-hooks",
    "commit": "tz gc"
  },
  "simple-git-hooks": {
    "commit-msg": "pnpm tz gv",
    "pre-commit": "pnpm lint-staged"
  },
  "lint-staged": {
    "*": "eslint --fix"
  }
}

然后重新执行一次 pnpm install

当你执行 pnpm install 时,通常会触发 prepare 脚本(定义在 scripts 中),运行 simple-git-hooks 。这个命令会将上述配置写入到 .git/hooks/pre-commit 和 .git/hooks/commit-msg 文件中。

如果没有执行到 prepare 脚本,需要手动执行一次。

pnpm prepare

命令行介绍

所有的命令都可以通过 tztanzerfe 触发。

cleanup [path]

  • 别名: c
  • 说明: 清除指定目录下的 node_modulesdist 等。
  • 用法:
    • tz c: 默认清除 **/dist**/node_modules
    • tz c path1,path2: 清除指定的多个路径(逗号分隔)。

self-update

  • 别名: su
  • 说明: 自更新:检查并更新 @tanzerfe/cli 到最新版本。

git-branches [url]

  • 别名: gb
  • 说明: 查看远程仓库所有分支(分支名 + 最新时间),并按时间倒序排序。

git-commit

  • 别名: gc
  • 说明: 按照天泽智联的规范进行 Git 提交。
  • 选项:
    • --add: 自动将所有变更文件添加到暂存区(默认为 true)。

git-commit-verify

  • 别名: gv
  • 说明: 校验 Git commit 提交信息是否符合天泽智联的标准规范。