All your git projects in one portable file. Keep it in your vault; rebuild any machine with one command.
Website: https://milyzc.github.io/git-projects-manager/
Sooner or later you set up a machine from scratch: a new laptop, a reinstall, a broken or stolen one.
Then you have to remember every repository, where it lived, its remotes, and which name, email and
signing key you commit with in each. git-projects keeps all of that in one small YAML file. The
file holds no secrets, so it fits next to your SSH keys in 1Password, Bitwarden or an age-encrypted
file. On the new machine you restore it and run git projects clone.
- One file, every repo: path, remotes, branch, submodules, status, grouped in sections (
projects-ai,projects-marketing,architecture...). - Safe to re-run: missing repos are cloned, existing ones are never overwritten.
- Right identity everywhere: per-section
user.name/user.email/ signing key written to each repo and its submodules, so nothing commits asyou@your-hostname.local. - No dependencies:
gitandpython3(standard library). Works as a git subcommand:git projects.
curl -fsSL https://raw.githubusercontent.com/milyzc/git-projects-manager/main/install.sh | bash
op document get projects.yml --out-file ~/.config/git-projects/projects.yml # or Bitwarden, age...
git projects check
git projects clone # --protocol https if this machine has no ssh key yet
git projects list -i
Save the file back to the vault whenever you add a project. Recipes for 1Password, Bitwarden, age
and a dotfiles repo: docs/vault.md.
curl -fsSL https://raw.githubusercontent.com/milyzc/git-projects-manager/main/install.sh | bash
git projects init # creates ~/.config/git-projects/projects.yml from the template
$EDITOR ~/.config/git-projects/projects.yml
git projects check && git projects cloneRequires git and python3 3.9+. Installing from a clone, a fork or a fixed release (--ref <tag>),
and updating: docs/install.md.
projects-ai:
defaults: # inherited by every project in the section
user:
name: Ada Lovelace
email: ada@ai-lab.example
signingkey: ~/.ssh/ai_signing.pub
sign: true
agent:
path: ~/projects-ai/agent
remote: git@github.com:ada-lab/agent.git
architecture:
diagrams:
path: ~/architecture/diagrams
remote:
origin: git@github.com:ada/diagrams.git
upstream: git@github.com:ada-studio/diagrams.git
submodules: true
status: paused # active (default) | paused | archived
user:
email: ada@studio.exampleEvery field, GPG / x509 signing and identity in submodules: docs/manifest.md.
| command | what it does |
|---|---|
git projects / list |
table of every repo: state, branch, ahead/behind; -i shows who you commit as |
git projects clone |
clones what is missing; existing repos only get missing remotes, submodules and identity |
git projects check |
validates the manifest and reports drift on cloned repos |
git projects paths |
one path per line, for scripts |
git projects init |
creates the manifest from the template |
git projects version / help |
version / usage |
Flags (--section, --status, --dry-run, --adopt, --protocol), exit codes and details:
docs/commands.md.
- Credentials never go in the manifest: URLs with a user, token or password are refused and printed masked.
- Git never prompts: https uses your credential helper (or
gh auth login), ssh your keys / agent. - Existing repos are never overwritten, and the tool logs or stores nothing.
Full details: docs/security.md.
Issues and pull requests are welcome. Before opening a PR:
tests/smoke.sh # offline, uses a throwaway $HOME
shellcheck -S warning bin/git-projects install.sh tests/smoke.shBoth run in CI on Linux and macOS. Update the README or docs/ in the same PR as any behaviour change.