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-merge-repositories

v0.0.5

Published

Calling this small util will merge many git repositories into a single monorepo.

Downloads

16

Readme

Git merge repositories

Calling this small util will merge many git repositories into a single monorepo.

Features

  1. Preserve git history
  2. Read repositories list from a cli option or from stdin
  3. Merge all repositories into a subfolder from the git root

Examples

You have 2 ways of entering repositories: with a --repos option or with stdin.

Pass repository list as an option

npx git-merge-repositories merge -m core -p packages --reset
-dir --repos [email protected]:adamgen/repo1.git [email protected]:adamgen/repo2.git

Pass repository list from stdin

Make a repos.txt file with similar contents

# Whitespace is ignored

# A repo start from the single character and has no trailing zeros
[email protected]:adamgen/adamgen-blog.git
[email protected]:adamgen/website.git

# Comments are optional
#[email protected]:zixi-dev/monitor.git
#[email protected]:zixi-dev/new-front.git
#[email protected]:zixi-dev/back.git
#[email protected]:zixi-dev/orchestrator.git

Then run this command:

cat repos.txt | npx git-merge-repositories merge -m core -p packages --reset-dir

Options

Copy-pasted from running npx git-merge-repositories merge --help

-m, --monorepo-dir [string] Destination directory that will contain the
monorepo's git root. This directory will be deleted
and re-initiated when wetting --reset-dir

-r, --repos [string...] Repository url. You must either provide this, or pass
stdin with valid repos.

-p, --packages-dir [string] Packages/projects dir. Similar to lerna's packages
directory

-y, --yes Without this option you will be asked to approve
after presented a list or the repositories to be
merged. Note - using stdin will never prompt a dialog

--reset-dir Clear the destination directory before running. Very
useful for debugging.

-h, --help display help for command

Architecture

It's a small side project, yet some thinking was made when working on it.

The lib/steps directory containes the actions done on the file system & git.

The lib/helpers directory has all other utilities that don't directly interact with the file system and can be called many times if needed.