| Crates.io | gitopolis |
| lib.rs | gitopolis |
| version | 1.13.0 |
| created_at | 2025-10-31 22:13:02.873219+00 |
| updated_at | 2025-11-28 19:18:12.781866+00 |
| description | Manage multiple git repositories - CLI tool - run commands, clone, and organize repos with tags |
| homepage | https://github.com/timabell/gitopolis |
| repository | https://github.com/timabell/gitopolis |
| max_upload_size | |
| id | 1910906 |
| size | 8,705,642 |
Manage multiple git repositories with ease.
git repositories.add, exec, clone, tag etc.).To get an idea what a real use might look like take a look at this blog post: "Using Gitopolis to Manage Multiple Git Repositories"
PATH.I suggest adding a shorter shell alias to save typing. Perhaps gm for git many or gop.
If you're a rust user, you can install from crates.io:
https://crates.io/crates/gitopolis
cargo install gitopolis
This will download the latest release crates.io, build and install it to ~/.cargo/bin/.
Gitopolis is in the AUR, so you can install it with paru or yay or your AUR helper of choice.
paru -S gitopolis
or
yay -S gitopolis
gitopolis has a fully documented command system, so use -h to get help for each command:
gitopolis -h
gitopolis clone -h
There are several ways to get started:
cd ~/repos/
gitopolis add *
gitopolis clone https://github.com/username/repo1.git
# Decide where to put the repos
mkdir ~/repos/
cd ~/repos/
# Grab a config file from somewhere (maybe a colleage) and add to the folder you'll keep the repos in
wget https://gist.githubusercontent.com/timabell/87add070a8a44db4985586efe380757d/raw/08be5b3c38190eeed4fda0060818fa39f3c67ee3/.gitopolis.toml
# Clone all the repos held in the downloaded config file to the current folder
gitopolis clone
Take a look at the python scripts at github.com/timabell/cloner
This script can read repo lists from github and azure devops and write them to a gitopolis config file ready for cloning, including some sensible default tags.
gitopolis exec -- git pull
gitopolis exec -- git status
Note: Commands executed with exec run in a non-interactive (non-TTY) environment to prevent hanging on prompts or pagers. This means:
less for git log)--color (e.g., gitopolis exec -- git log --color)~/.ssh/known_hosts)For compact, parsable output that's easy to sort and analyze use --oneline, this will put all the output on a single line for each repo (removing newlines).
e.g. to see the latest commit for all the repos, with the most recently touched repo first:
gitopolis exec --oneline -- git log --oneline -n 1
When dealing with many git repos, it can be cumbersome and slow to have to run commands on every repo every time, so you can use tags to filter down what's relevant to you in the moment, e.g. backend, my-team, rust or any other way of categorizing you can thing of.
gitopolis tag some_tag repo1 repo2
gitopolis exec -t some_tag -- git pull
You can use multiple tags with powerful AND/OR logic to precisely filter repositories:
--tag flag) use AND logic: all tags must match--tag flags use OR logic: at least one tag group must matchExamples:
# Match repos with BOTH 'backend' AND 'rust'
gitopolis list --tag backend,rust
# Match repos with (backend AND rust) OR (frontend AND typescript)
gitopolis exec --tag backend,rust --tag frontend,typescript -- git pull
# Clone repos with (production AND critical) OR (staging AND critical)
gitopolis clone --tag production,critical --tag staging,critical
This allows for flexible repository filtering based on combinations of characteristics.
Show the recorded information about a specific repository:
$ gitopolis show 0x5.uk
Tags:
public
github
blog
rust
Remotes:
origin: git@github.com:timabell/0x5.uk
List all repositories with tags and remote URLs:
gitopolis list --long
List all tags and the repositories they're applied to:
gitopolis tags --long
Move a repository to a new location and update the configuration:
gitopolis move repo old-path new-path
Gitopolis supports multiple git remotes per repository. Sync remotes from your git repositories into the .gitopolis.toml file:
gitopolis sync --read-remotes
Sync remotes from .gitopolis.toml back to your git repositories:
gitopolis sync --write-remotes
Note there is no automatic sync, gitopolis will never fiddle with the remotes in the managed repos or its own config unless relevant commands are invoked.
Gitopolis supports executing complex shell commands for each repository - including pipes, redirection, and chaining with && and ||.
To use these features, pass your entire command as a single quoted string to avoid the shell you are using processing them before they get to gitopolis:
gitopolis exec -- 'git status && git pull'
gitopolis exec -- 'git log -1 | grep "feat:"'
You can combine this with normal shell piping/redirection of the entire gitopolis output, e.g.:
gitopolis exec -- 'git log -1 | grep "feat:"' | wc -l
Gitopolis creates and manages all its state in a single simple .gitopolis.toml file in the working directory that you can edit, read, share with others and copy to other machines.
It is stored in TOML format which is a well-supported config markup with parsers for many programming languages.
Here's an example of the contents:
[[repos]]
path = "gitopolis"
tags = ["tim"]
[repos.remotes.origin]
name = "origin"
url = "git@github.com:timabell/gitopolis.git"
[[repos]]
path = "schema-explorer"
tags = ["tim", "databases"]
[repos.remotes.origin]
name = "origin"
url = "git@github.com:timabell/schema-explorer.git"
[[repos]]
path = "database-diagram-scm"
tags = ["databases"]
[repos.remotes.origin]
name = "origin"
url = "git@github.com:timabell/database-diagram-scm.git"
The TOML array format takes a little getting used to, but other than that it's pretty easy to follow and edit by hand, and it allows clean round-trips of data, and is supported in just about every programming language.
Think a metropolis of git repos.
It's a lot to type as a name, but it's nice and unique, and if you use it a lot I suggest you create a shell alias to something shorter.
More recently I've been adding more features to help with other clients, and enjoying the benefits of high-quality end-to-end tests as I increasingly work with claude code on shipping features considerably more rapidly (though not always more easily lol, crazy LLMs).
If you find this useful, or just think it's cool, please do help spread the word.
Suggestions welcome, particularly adding your experience, problems and ideas to the issues list.
I'm happy for people to open issues that are actually just questions and support queries.
Rough internal design and ambitions can be found at Design.md.
PRs are appreciated though it might be best to open an issue first to discuss the design.
Here's the other tools I'm aware of that have more-or-less similar capabilities
git for-each-repo - new built-in git command for running git commands on many repos