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-boot

v0.1.1

Published

Instant git worktree bootstrap with CoW node_modules, env copy, and port shifting for parallel agents

Readme

worktree-boot

ci npm JSR JSR Score Rust license

One line: npx worktree-boot my-branch (or bunx worktree-boot my-branch): git worktree + copy-on-write node_modules + shifted .env ports in about a second.

Why

Plain git worktree add leaves out gitignored .env files, starts with an empty node_modules, and keeps identical PORT=3000 values so parallel dev servers collide. Docker devcontainers isolate ports but cost gigabytes of RAM and slow boot times.

worktree-boot clones heavy folders using cp --reflink=auto on Linux and macOS when the filesystem supports it (falling back to a recursive copy otherwise, and using recursive copy on Windows). It copies .env*, shifts ports (3000 -> 3001, 5173 -> 5174), and wires LOCAL_LLM_URL / OLLAMA_HOST for local LLM stacks. Provider API keys are not copied unless you pass --propagate-api-keys (CLI) or propagateApiKeys: true (MCP).

Install

Bun / npm:

bunx worktree-boot agent-2 --allow-write
npx worktree-boot agent-2 --allow-write

# or install in your project / globally
bun add -d worktree-boot
npm i -D worktree-boot

JSR:

bunx jsr add @kanchingyg/worktree-boot
npx jsr add @kanchingyg/worktree-boot

Cargo (Rust native binary):

cargo install --git https://github.com/kanchingyg/worktree-boot

The core engine is Rust (src/lib.rs, src/main.rs, src/mcp.rs). TypeScript under src/*.ts is included for npx / bunx / JSR usage and MCP bridge helpers.

Quick start

npx worktree-boot agent-2 --allow-write
cd .worktrees/agent-2
npm run dev
npx worktree-boot list
npx worktree-boot teardown agent-2 --allow-write
npx worktree-boot agent-3 --dry-run   # preview paths, clones, and ports without writing

MCP

npx worktree-boot --mcp --allow-write
bunx worktree-boot --mcp --allow-write

Add to your agent MCP config with command: npx and args: ["-y", "worktree-boot", "--mcp", "--allow-write"].

Ollama / OpenAI-compatible locals

Each worktree gets offset ports on OLLAMA_HOST and LOCAL_LLM_URL so you can run several coding agents against local inference without re-indexing or reinstalling dependencies.

MCP Tools Reference

| Tool | Mutates | Description | | --- | --- | --- | | create_worktree | true | Create a git worktree, reflink-clone node_modules, copy .env* without cloud API keys by default, and shift dev ports (requires --allow-write). | | list_worktrees | false | List active worktrees managed under .worktrees/ and their assigned port offsets. | | teardown_worktree | true | Remove a managed worktree directory and prune its git worktree metadata (requires --allow-write). |

Editor and Agent Integration

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "worktree-boot": {
      "command": "npx",
      "args": ["-y", "worktree-boot", "--mcp"]
    }
  }
}

Claude Code CLI

claude mcp add worktree-boot -- npx -y worktree-boot --mcp

Programmatic Usage (JSR / TypeScript)

import * as bridge from "jsr:@kanchingyg/worktree-boot/bridge";

Runtime Safety and Guardrails

  • Stdio frame isolation: When --mcp is active, hijackStdoutForMcp() redirects accidental console.log calls to stderr so JSON-RPC 2.0 frames on stdout never corrupt.
  • Read-only by default: Mutating tools (mutates: true) are blocked in --dry-run mode and require explicit --allow-write authorization.
  • Loop breaker: Repeated identical (toolName, args) invocations are hashed with SHA-256 and halted after 3 consecutive repeats to prevent runaway agent loops.
  • Context budget truncation: Tool outputs are middle-truncated (60% head / 40% tail) scaled to the probed local model n_ctx (Ollama /api/show, llama.cpp /props, vLLM /v1/models).
  • Secret redaction and path normalization: AWS keys (AKIA*, ASIA*), bearer tokens, and sk-* keys are scrubbed before returning tool output, and Windows drive paths (C:\...) translate cleanly to /mnt/c/... when WSL mode is enabled.

License

MIT