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

@octavian-tocan/wt-cli

v0.1.0

Published

Git worktree manager with setup, health checks, repair, and shell-native switching

Readme

wt-cli

wt-cli is a config-driven git worktree manager for repos that need more than git worktree add.

It gives you one place to create worktrees, hydrate them, check their health, repair drift, clean them up, and jump between them from your shell.

What it does

  • creates local, remote-tracking, or brand-new branch worktrees
  • runs repo-specific setup steps after creation
  • checks whether a worktree is actually ready to use
  • repairs unhealthy worktrees by pruning and rerunning setup
  • emits shell helpers so wt go feature/foo really changes directories
  • supports machine-readable --json output for scripts and automation

Install

pnpm add -D @octavian-tocan/wt-cli

If you want a repo-local shortcut, add this to package.json:

{
  "scripts": {
    "wt": "wt"
  }
}

Quick start

Initialize config in a repo:

pnpm exec wt init

Create a worktree and hydrate it automatically:

pnpm exec wt create feature/search-polish

Check what exists:

pnpm exec wt list
pnpm exec wt status
pnpm exec wt doctor

Commands

  • wt create <branch> - create a worktree and optionally auto-setup it
  • wt go <branch> - resolve a worktree path for shell switching
  • wt list - list all worktrees
  • wt status - show a status overview
  • wt setup [branch|path] - run setup steps for a worktree
  • wt sync-env - rerun configured copy steps across worktrees
  • wt clean - remove merged, stale, or orphaned worktrees
  • wt doctor - inspect worktree health and readiness
  • wt repair - prune and rehydrate unhealthy worktrees
  • wt exec <branch> -- <command> - run a command inside a worktree
  • wt init - scaffold wt.config.json
  • wt shell init zsh|bash|fish - emit shell integration

Shell integration

To make wt go foo change the current shell directory instead of printing a path:

eval "$(pnpm exec wt shell init zsh)"

If wt is installed globally, wt shell init zsh works too. The generated helper falls back to pnpm exec wt or npx wt when the binary is not already on your PATH.

Config

wt-cli reads config from the first source it finds:

  1. wt.config.json
  2. package.json#wt

Example:

{
  "worktreeDir": "tree",
  "mainBranch": "main",
  "defaultBase": "main",
  "remote": "origin",
  "autoSetup": true,
  "staleDays": 30,
  "setup": {
    "steps": [
      { "type": "install", "command": "auto" },
      {
        "type": "copy",
        "from": ".env*",
        "to": ".",
        "exclude": [".env.example"],
        "optional": true
      },
      { "type": "run", "command": "pnpm run build:packages" },
      {
        "type": "verify",
        "path": "node_modules",
        "label": "Dependencies installed"
      }
    ]
  },
  "lifecycleScripts": {
    "postsetup": "wt:postsetup",
    "preclean": "wt:preclean"
  }
}

Setup step types

  • install - install dependencies with auto-detection or an explicit command
  • copy - copy files from the main worktree into the target worktree
  • run - run an arbitrary command inside the worktree
  • verify - assert that a path exists after setup

Canonical config only

wt-cli no longer supports the older .worktree-manager.json format or legacy config keys like buildCommand, excludeEnvFiles, and verifyPaths. Use wt.config.json or package.json#wt with the canonical setup.steps model.