Config & Discovery
Where the CLI's package list comes from, and how to add repos to it without hand-editing JSON.
setup
An interactive menu for the config file itself. Shows the current roots and packages lists with ✓ exists / ✗ not found (and, for packages, ! no package.json/.git here when the folder exists but isn't a package), and lets you add a root or package directory, edit an existing entry, or remove one (with confirmation).
polyrepo setupA path isn't checked strictly — adding one that doesn't exist yet just prints a warning, in case the folder shows up later. Changes are only written to disk when you choose "Save and exit"; "Discard changes and exit" throws away anything done in that session.
Example output — the current state, right before the menu itself:
Configure package sources
Editing: C:\work\NPM\polyrepo.config.json
roots (subfolders are scanned as packages)
1. C:\work\NPM ✓ exists
packages (the folder itself is the package)
(none)
? What do you want to do?Options
--config <path>
Edit a config file other than the default one next to the CLI itself.
Example:
polyrepo setup --config "/path/to/polyrepo.config.json"clone
Diffs a GitHub org/user's repo list against what's already cloned under one root directory, and clones whatever's missing.
polyrepo clone --org <name> [options]gh repo list <org>— every repo under that org/user (archived ones are skipped by default).- Compares the names against the directories already found under the target root (
--root, or the first root in the config if not given). - Shows a checkbox of the missing ones (all checked by default), then
git clones each selected one into the target root, one at a time.
--org is required and isn't stored in the config — the config's roots/packages describe where local repos live, not which GitHub account they came from.
Example output — two repos picked from the checkbox, cloned one at a time:
Clone missing repos from my-github-org
Target root: C:\work\NPM
? Pick repos to clone into C:\work\NPM:
vue-command-palette
vue-toast-kit
[1/2] vue-command-palette
$ git clone https://github.com/my-github-org/vue-command-palette.git C:\work\NPM\vue-command-palette
✓ Cloned into C:\work\NPM\vue-command-palette.
[2/2] vue-toast-kit
$ git clone https://github.com/my-github-org/vue-toast-kit.git C:\work\NPM\vue-toast-kit
✓ Cloned into C:\work\NPM\vue-toast-kit.Options
--org <name>
GitHub org or user to list repos from. Required.
--root <path>
Root directory to clone into. Defaults to the config's first roots entry.
--include-archived
Also offer archived repos (skipped by default).
--packages <a,b,c>
Only offer these repo names, skipping the interactive checkbox.
--yes
Skip the "proceed?" confirmation.
--dry-run
Print what would be cloned, without actually cloning anything.
Example:
polyrepo clone --org my-github-org --root "C:\work\NPM" --yes