Skip to content

Polyrepo CLI

v1.0.5CLI ToolNode.js

An interactive CLI for managing a folder of local npm package repos: version bumps through a PR, npm publishing, GitHub releases, and cross-package dependency drift — all from one tool.

Polyrepo CLI
Get started →
npm install -g polyrepo-cli
01 — Purpose

When you'd reach for this

One package is a git clone and an npm publish. Fifteen packages in one folder turns into a discipline problem: which branch is named what where, what hasn't been pushed, who forgot to run tests before a release. polyrepo-cli takes that process off your hands.

Releasing each package is the same manual loop

Go into the directory, bump the version, open a PR, wait for the merge, tag it — then repeat for the next package. A checkbox picks which packages need it, and the whole cycle runs for all of them at once.

One repo's default branch is master, another's is main

A script with a hardcoded branch name breaks exactly where someone renamed the default branch on GitHub. The actual name is detected per repository, and everything else works the same regardless of what it's called.

An npm publish run stalls halfway through the list

The login expired, and that only comes to light once the fifth package out of ten is already packed and ready to publish. Authentication is checked — and refreshed if needed — once, before publishing even starts.

Dozens of releases later, the repos are full of debris

Branches from merged PRs stick around both locally and in the remote-tracking list, and references to branches long deleted on GitHub don't disappear on their own. A periodic check finds all of it and offers to clean it up safely.

02 — Features

At a glance

Setup and repo discovery

Setup and repo discovery

The list of package folders lives in a config file — no hand-editing JSON. A separate command diffs a GitHub org's repos against what's already cloned locally and pulls down what's missing.

Status for every package at a glance

Status for every package at a glance

Version, branch, git status, tag, release, and npm registry state for every package — checked in parallel. Outdated dependencies and open PRs are aggregated across every repo at once, with export to Markdown, JSON, CSV, or HTML.

Health checks with safe self-repair

Health checks with safe self-repair

Checks the environment, whether a repo's default branch has drifted from GitHub, divergence from origin, branch protection, and leftover branches from past releases — fixing what's safe to fix automatically.

Branch syncing without surprises

Branch syncing without surprises

Selected repos fast-forward to their up-to-date default branch — whatever it's actually named, master or main. A full reset of a dirty repo is only ever available behind an explicit flag, never by default.

A guided release workflow

A guided release workflow

The version bumps through a branch and PR, resuming exactly where a previous run left off, drafting a CHANGELOG.md entry from the commit history on its own. Separate steps close out the process with a tag and a GitHub Release.

Publish, and run anything

Publish, and run anything

Only packages actually ahead of the registry get published to npm, and an expired login is handled on its own. Any command runs across selected repos one at a time, with live terminal output.