GitHunt
AL

aleclarson/subrepo-install

Postinstall scripts for git subrepos

subrepo-install

The easy way to set up a standalone subrepo outside its monorepo.

Warning

This tool is intended for projects using pnpm only! If you use a different package manager, please open an issue.

pnpm add subrepo-install

How it works

Use subrepo-install in a postinstall script to clone dependencies that would otherwise be provided by a monorepo. If a dependency always needs to be cloned, you can do that too.

This approach is specifically designed to work well with git-subrepo.

If subrepo-install is used in a workspace context, it will realize this automatically and link to the monorepo-provided dependencies instead of cloning them.

Additionally, you can inherit dependencies from these sub-dependencies by setting the inheritDependencies option. This is similar to pnpm's Catalogs feature, but is designed to work with git-subrepo.

Languages

TypeScript100.0%

Contributors

MIT License
Created April 14, 2025
Updated May 10, 2025