Change repo

Latest version Latest release status

Go version License

A simple CLI utility to change the current working directory to one containing Git repository.


Just run the CLI and it will scan the provided directory recursively and present a list of all found Git repositories, allowing you to choose from that list:

change-repo .

When you pick from the list it will open a new shell in the selected location. You can also configure a set of standard locations using CHANGE_REPO_PATH environment variable:

export CHANGE_REPO_PATH="/path/to/location/1:/path/to/other/location"

and then invoke application without any arguments:


it will first allow you to pick the directory containing Git repositories from the list of locations in CHANGE_REPO_PATH environment variable and then will recursively scan the selected directory and present the list of all Git repositories in it, allowing you to chose from that list.

That’s it!


To get the complete list of all flags, use

change-repo --help

Most likely you will also be interested in creating alias

alias cr="change-repo"


Change-repo has several options that control its behavior:

  • --help – display help message
  • --maxdepth – controls recursion depth when scanning for Git repositories (default: 20)
  • --version – display version and copyright information


Change-repo can be configured using the following environment variables:

  • CHANGE_REPO_PATH – list of paths to directories containing Git repositories. Used when invoking change-repo without any arguments. When empty or not set defaults to current working directory.
  • CHANGE_REPO_SHELL – when set, its value will be used instead of SHELL environment variable.
  • SHELL – shell to invoke when changing directory.


Change-repo is open-sourced software licensed under the GNU General Public License version 3 or later.


View Github