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

worktree-deps-autolink

v0.1.1

Published

Auto-link untracked top-level files from the main Git worktree into newly added worktrees.

Readme

worktree-deps-autolink

安装后自动注入 Git hook:当执行 git worktree add 创建新 worktree 时,自动运行 link-untracked.cjs,把主 worktree 顶层未跟踪文件/目录软链接到新 worktree。

使用

npm install -D worktree-deps-autolink

安装脚本会在当前仓库设置:

git config core.hooksPath <main-repo>/.git/worktree-deps-autolink/_

也可以手动执行:

npx worktree-deps-autolink
npx worktree-deps-autolink link
npx worktree-deps-autolink install
npx worktree-deps-autolink status
npx worktree-deps-autolink uninstall

不带参数或使用 link 会立即在当前目录运行链接逻辑,适合在已有 worktree 中手动补链。

触发条件

注入的是 post-checkout hook,仅在以下条件都满足时执行链接脚本:

  • post-checkout 的第三个参数为 1
  • 第一个参数是全零 revision,即新 worktree 的首次 checkout
  • 未设置 WORKTREE_DEPS_AUTOLINK=0

跳过安装或执行

WORKTREE_DEPS_AUTOLINK=0 npm install
WORKTREE_DEPS_AUTOLINK=0 git worktree add ../foo

如果安装前已经配置过 core.hooksPath,生成的 hook 会在执行完自动链接逻辑后继续调用原 post-checkout hook。