Skip to content

Install

crossrepo is one npm package, crossrepo. It installs two commands that do the same thing: xr and crossrepo. These docs use xr.

Terminal window
npm i -g crossrepo
Terminal window
bun add -g crossrepo

Both ways need Node 22.13 or newer, also with bun add -g, because the installed xr runs with Node.

Check that it works:

Terminal window
xr --version

To run crossrepo with no Node and no global install, use bunx. It needs only Bun 1.3 or newer.

Terminal window
bunx crossrepo --version
bunx crossrepo codebase init

bunx follows the #!/usr/bin/env node line of xr, so when a Node is on your PATH, bunx crossrepo runs xr with that Node. If that Node is older than 22.13, use bunx --bun crossrepo so Bun runs it.

Need Version
Node 22.13 or newer, for npm i -g and bun add -g
Bun 1.3 or newer, only for bunx crossrepo
git 2.27 or newer

With an older git, xr stops with the error git-too-old.

crossrepo works on macOS, Linux, WSL and native Windows.

On native Windows, xr runs hooks with the sh.exe of Git for Windows. xr finds it from the folder of git.exe on your PATH. When a hook must run and there is no sh.exe, the command fails with sh-not-found before it changes anything. Commands with no hooks to run do not need sh.exe.

Make your first project with the Quick start.