A tool to keep local repos up to date and clone new repos from a given team.
reposyncbash -c "$(curl -fsSL https://raw.githubusercontent.com/sejoharp/reposync/refs/heads/main/scripts/install.sh)"# install rust
brew install rustup-init
# build and install reposync
make installnix build# move to home-manager config. e.g.:
cd ~/.config/home-manager
# add this as input;
reposyncpkg = {
url = "github:sejoharp/reposync";
};
# optional: update index
nix flake lock --update-input reposyncpkg
# add this to packages:
inputs.reposyncpkg.packages.${pkgs.stdenv.system}.default
# build generation
nh home build .
# switch generation
nh home switch .export GITHUB_TEAM_REPO_URL=https://api.github.com/organizations/[org-id]/team/[team-id]/repos
export REPO_ROOT_DIR=[dir/to/repo/root]
export GITHUB_TEAM_PREFIX=team_
export GITHUB_TOKEN=ghp_56789# bump version (patch by default)
make version-update
# create a git commit
git add ...
git commit ...
# tag the commit
make tag-release
# push commit and tag
make push-releasecargo run 3.21s user 4.07s system 6% cpu 1:51.83 total
cargo run 1.78s user 1.88s system 24% cpu 14.688 total
cargo run 1.71s user 1.73s system 30% cpu 11.267 total
cargo run 1.62s user 2.17s system 71% cpu 5.344 total