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 🙏

© 2025 – Pkg Stats / Ryan Hefner

git-worktree-cli

v0.0.3

Published

Git worktree management tool for parallel development

Readme

Git Worktree Manager (mktree)

Claude Codeでの並列開発をサポートするGit Worktree管理ツール。

概要

  • プライマリ: ソースディレクトリにあるメインブランチ
  • Worktree: .git/worktrees/ に作成される作業ブランチ
  • プライマリとWorktreeを自由に切り替え可能
  • ローカル環境での動作確認も維持

インストール

# プロジェクトルートでインストール
cd git-worktree-manager
npm install

使用方法

基本コマンド

# Worktree一覧表示
npx mktree list

# 新しいWorktreeを作成
npx mktree add feature-123

# Worktreeの存在確認
npx mktree check-exist feature-123

# Worktreeを削除
npx mktree remove feature-123

# Worktreeに切り替え
npx mktree switch feature-123

高度な操作

# WorktreeをプライマリにMx
npx mktree stage-primary feature-123

# リモートから同期(全Worktree)
npx mktree remote-sync

# 特定のWorktreeのみ同期
npx mktree remote-sync feature-123

# Worktreeをリネーム
npx mktree rename old-feature new-feature

ブランチ管理

# 新しいブランチをプライマリに設定(現在のブランチをWorktreeに移動)
npx mktree apply-primary feature-456

# 新しいブランチをプライマリに設定(Worktree作成をスキップ)
npx mktree overwrite-primary feature-456

# ヘルプ表示
npx mktree help

主要機能

stage-primary の動作

  1. プライマリに未コミットの変更があればstash
  2. 現在のプライマリブランチがmain/master/develop以外の場合、Worktreeに移動
  3. 指定されたWorktreeのブランチをプライマリに切り替え
  4. 元のWorktreeを削除
  5. stashした変更があれば復元

remote-sync の動作

  • 引数なし: 全てのWorktreeでgit pullを実行
  • 引数あり: 指定されたWorktreeのみgit pullを実行

注意事項

  • Worktreeは必ず .git/worktrees/ に作成される
  • プライマリWorktreeは削除・リネーム不可
  • Git repository内でのみ動作

使用例

# 新機能開発の開始
npx mktree add feature-chat-improvement

# 別の緊急対応
npx mktree add hotfix-login-bug

# 緊急対応をプライマリに持ってきて動作確認
npx mktree stage-primary hotfix-login-bug

# 修正完了後、元の機能開発に戻る
npx mktree stage-primary feature-chat-improvement

ディレクトリ構成

git-worktree-manager/
├── index.js          # メインスクリプト
├── package.json      # NPM設定
└── README.md         # このファイル