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

@grant/mgit

v1.1.2

Published

Clone all repos for a GitHub user or organization

Readme

mgit

CI Release Please Publish npm

Clone all repos for a GitHub user or organization.

npm i -g @grant/mgit

Features

  • Clones every repo for a user or org in the current directory
  • Skips archived repos (reported in summary)
  • Optional --pull to git pull in existing repos (off by default)
  • Progress table: new vs existing, per-repo time, total progress with elapsed time
  • Configurable timeout per clone (default 5m) with --timeout=SECONDS; timed-out repos retried at end; slow/skip/fail clearly marked

Commands

mgit clone [owner]   # Clone all repos (default: authenticated user)
mgit init [token]    # One-time: create ~/.mgit.json with your token
mgit status          # List repos cloned for this user/org

clone

Clones every repository at github.com/<owner> (user or org) into the current directory. If you omit owner, it uses the GitHub user for your saved token.

mgit clone                # clone all repos for the authenticated user
mgit clone google         # clone all of google's repos
mgit clone --pull         # clone missing repos and git pull in existing ones
mgit clone --timeout=120  # 2-minute timeout per clone (default: 300)

After cloning, mgit writes a .mgit.json file in the current directory with the owner and list of repo names so mgit status knows what you have.

status

Prints the owner and list of repos that were cloned in this directory (from .mgit.json).

mgit status
# grant (42 repos)
#   grant/mgit
#   grant/other-repo
#   ...

Setup (one-time)

Create the global config with your GitHub token. Create a token at github.com/settings/tokens (scope: repo), then:

mgit init <your-token>

This creates ~/.mgit.json with your token.

Develop

  1. Install dependencies: npm install
  2. Install the CLI from this repo (one-time): npm run build — puts mgit on your PATH using this checkout.
  3. Create global config (one-time): mgit init <token> — use a GitHub token with repo scope.

Watch: Use two terminals.

  1. Terminal 1: npm run dev — recompiles when you save a .ts file.
  2. Terminal 2: mgit clone, mgit status, etc. — each run uses the latest code.

Publish (npm)

You can publish from your machine or let the release pipeline publish when you merge a release PR.

Manual publish (from your machine)

  1. Bump version in package.json (e.g. set "version": "1.0.1") or run npm version patch / minor / major.
  2. Build: npm run build:ci
  3. Log in to npm (one-time per machine): npm login — enter username, password, and OTP if you use 2FA.
  4. Publish: npm publish --access public (required for scoped packages like @grant/mgit). With 2FA you’ll be prompted for a one-time password; pass it inline with npm publish --access public --otp=123456 if you prefer.

Then npm i -g @grant/mgit will install the new version.

Automated publish (Release Please + GitHub Actions)

  1. Conventional commits — Use fix:, feat:, or feat!: (breaking) in commit messages so Release Please can bump the version.
  2. Release PR — On push to main, Release Please opens or updates a release PR (version + CHANGELOG). Merge it to create the GitHub release.
  3. npm — When the release is published, the Publish to npm workflow runs. Configure a trusted publisher on the package’s npm page (Package access → Trusted publishers) so publishing uses OIDC—no token in repo secrets.

After each merged release PR, the new version is on npm and installable with npm i -g @grant/mgit.

Tech