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

@lyzxzmy/hooksmith

v0.2.0

Published

Git hook manager — interactive multi-hook, multi-script installer.

Readme

hooksmith

Git hook 管理器 — 交互式多 hook 类型、多脚本安装器。

特性

  • 支持所有 Git hook 类型(pre-commit、commit-msg、pre-push 等)
  • 交互式初始化,引导选择 hook 类型和脚本
  • 扩展系统,支持自定义脚本
  • 内置 summary 扩展,使用 AI 自动生成 commit 变更摘要
  • 支持 Cursor CLI / Cursor SDK 两种 AI 调用方式
  • 自动生成 .gitignore 规则,避免提交运行时文件

快速开始

# 安装
npm install -g hooksmith

# 在 Git 仓库中初始化
cd your-project
hs -init

# 正常提交,hook 会自动触发
git add .
git commit -m "feat: add user login"

工作流程

hs -init
  ├─ 交互选择 hook 类型 (pre-commit / commit-msg / pre-push / ...)
  ├─ 多选该 hook 下的脚本 (summary / ...)
  ├─ 安装脚本到 .git_hook/<hook-type>/<script-id>/
  └─ 写入 .git/hooks/<hook-type>

git commit (触发 pre-commit hook)
  └─ .git/hooks/pre-commit
       └─ hs -hook -type pre-commit
            └─ 执行 .git_hook/pre-commit/ 下的所有脚本

命令速查

| 命令 | 说明 | |------|------| | hs -init | 交互式初始化,选择 hook 类型和脚本 | | hs -install [-hook <type>] [-script <id>] | 静默安装 | | hs -uninstall [-hook <type>] [-all] | 卸载 hook 或全部 | | hs -status [-json] | 查看已安装 hook 和脚本状态 | | hs -doctor [-json] | 运行诊断 | | hs -hook -type <name> | hook 触发入口(由 git 自动调用) | | hs -help | 打印帮助 | | hs -version | 输出版本号 |

目录结构

项目根目录/
├── .git/hooks/
│   └── pre-commit              # hooksmith 管理的 hook 脚本
├── .git_hook/                  # hooksmith 工作目录
│   ├── config.yml              # 全局配置
│   ├── pre-commit/
│   │   ├── manifest.yml        # 该 hook 下的脚本清单
│   │   └── summary/
│   │       ├── config.yml      # 脚本自己的配置
│   │       ├── manifest.yml    # 脚本元信息
│   │       └── dist/           # 脚本代码
│   └── .state/                 # 运行状态和日志
│       ├── state.json
│       └── logs/
└── docs/change/                # summary 生成的文档(可配置)

文档

开发

git clone https://github.com/bixiangting/hooksmith.git
cd hooksmith
npm install
npm run build
npm test

License

MIT