Quickstart
Quickstart
Run from a project that wants to vendor upstream packages:
Or install the CLI globally with Homebrew if you'd rather have inrepo on your $PATH:
brew install inrepo and npx inrepo install the same npm-published artifact, so the rest of this guide works either way. Substitute inrepo for npx inrepo when you have it installed locally.
Initialize config explicitly, or let the first sync or add prompt for where config should live:
Add and pin a package:
If the npm registry package does not expose a GitHub repository URL, pass the git URL:
Use -D when the generated local package should be wired into devDependencies:
The normal collaboration loop is:
- Run
npx inrepo syncto rebuild generated modules frominrepo.lock.jsonandinrepo_patches/. - Edit files under
inrepo_modules/<package>/. - Run
npx inrepo patch <package>to capture those edits intoinrepo_patches/<package>/. - Commit config, lockfile changes, and patch files.
- Teammates pull and run
npx inrepo sync.
Commit these files:
inrepo.jsonorpackage.json#inrepoinrepo.lock.jsoninrepo_patches/
Keep these generated files out of git:
inrepo_modules/.inrepo/
Before merging, run:
verify checks that generated module trees still match the lockfile plus committed overlay.
Safety checks
inrepo tries not to silently destroy local work.
If inrepo_modules/ changed but inrepo_patches/ did not, sync treats that as uncaptured work and asks you to run npx inrepo patch. If both changed, sync reports a conflict.
Use npx inrepo sync --force only when you want to discard generated edits. Before doing that, inrepo saves a backup under .inrepo/backups/.