Skip to content

Installation

Install repopo with your package manager.

To run repopo in a repository, from scripts, Git hooks, or CI, install it as a dev dependency:

Terminal window
npm i -D repopo

Then create a configuration file and run repopo check.

To run policies from your own program with the programmatic API, or to publish policies for other repositories, install it as a regular dependency:

Terminal window
npm i repopo

You can also install repopo globally to use the repopo command in any repository:

Terminal window
npm install --global repopo
# or
pnpm add --global repopo

Each repository still needs its own repopo.config.ts, and that file must be able to import repopo.

The repopo check-native command uses a Rust binary, repopo-core. When you install repopo, a postinstall script downloads a prebuilt binary for Linux (x64, arm64), macOS (x64, arm64), or Windows (x64). If the download fails, installation still succeeds. Only check-native needs the binary; repopo check doesn’t.

  • Set REPOPO_SKIP_POSTINSTALL=1 to skip the download.
  • Point to your own build with --binary-path or the REPOPO_CORE_PATH environment variable.