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

git-easy-worktree

v1.1.4

Published

CLI tool to create git worktrees from URL

Readme

Git Easy Worktree

A Node.js CLI tool to easily create git worktrees from a repository URL.

Installation

# Install globally from npm
npm install -g git-easy-worktree

# Or install from source
git clone https://github.com/your-username/git-easy-worktree.git
cd git-easy-worktree
npm install
npm link

Usage

git-wt [repo-url] [branch-name ...] [options]

If repo-url or branch names are missing, the CLI will prompt you to enter them interactively.

You can provide multiple branch names in either of these formats:

  • Space-separated: git-wt <repo-url> dev test release
  • Comma-separated: git-wt <repo-url> "dev,test,release"

Options

  • -d, --dir <directory>: Base directory for worktrees (default: current directory)

Input modes

  • Full args: git-wt <repo-url> <branch...>
  • Partial args: git-wt <repo-url> (CLI prompts for branches)
  • No args: git-wt (CLI prompts for repo URL and branches)

In non-interactive mode (for example CI), you must pass both repo URL and branch names in arguments.

Branch parsing rules

  • Supports both separators: spaces and commas
  • Trims spaces automatically
  • De-duplicates repeated branch names
  • Keeps the input order for creation

Example:

git-wt <repo-url> "dev, test dev release"
# => creates: dev, test, release

What the command does

  1. Resolves repo directory name from URL
  2. Creates/updates a local bare repository at <base-dir>/<repo>/.bare
  3. Creates one worktree directory per branch at <base-dir>/<repo>/<branch>
  4. If a branch does not exist in remote, creates a new local branch automatically

Example

# Create a worktree for the 'master' branch of Hello-World
git-wt https://github.com/octocat/Hello-World.git master

# Create worktrees for multiple branches
git-wt https://github.com/octocat/Hello-World.git dev test release

# Create worktrees using comma-separated branches
git-wt https://github.com/octocat/Hello-World.git "feature/a,feature/b"

# Provide URL only, then input branches interactively
git-wt https://github.com/octocat/Hello-World.git

# Start interactive input mode
git-wt

# Resulting structure:
# ./Hello-World/
#   .bare/    (Bare repository)
#   master/   (Worktree)
#   dev/      (Worktree, if requested)

Troubleshooting

  • Missing required arguments in non-interactive mode
    Pass both URL and branch names directly, for example:
    git-wt https://github.com/octocat/Hello-World.git main

  • Worktree path ... already exists
    The target branch folder already exists in base dir. Use a different branch name or remove the existing folder first.

Development

npm install
npm run dev -- <url> <branch...>
npm run build