Project

repohub

0.0
The project is in a healthy, maintained state
Repomate helps you maintain a list of git repositories and keep them up to date with their remote sources
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 13.0
~> 3.0

Runtime

~> 1.4
~> 1.7
 Project Readme

RepoMate 🧉

A command-line tool to manage and synchronize multiple git repositories. This tool helps you maintain a list of git repositories and keep them up to date with their remote sources.

Features

  • Maintain a list of repositories to sync
  • Add and remove repositories from the sync list
  • Automatically clone new repositories
  • Update existing repositories
  • Configurable paths for code and configuration storage

Installation

  1. Ensure you have Ruby installed on your system
  2. Copy repomate.rb to ~/.local/bin/:
mkdir -p ~/.local/bin
cp repomate.rb ~/.local/bin/
chmod +x ~/.local/bin/repomate.rb
  1. Add the fish function to your fish config:
mkdir -p ~/.config/fish/functions
cp repomate.fish ~/.config/fish/functions/

Usage

The tool can be used either directly through Ruby or via the fish shell function.

Basic Commands

# List all repositories in the sync list
repomate list

# Sync all repositories
repomate sync

# Sync one repository
repomate sync -l "git@github.com:alex-quiterio/repomate.git"

# Add a repository to the sync list
repomate add -l "git@github.com:alex-quiterio/repomate.git"

# Remove a repository from the sync list
repomate remove -l "git@github.com:alex-quiterio/repomate.git"

For the future

Allow to set custom paths per configuration

# Set custom code directory in the default config
repomate --config-file /custom/config.txt --set-code-path /custom/code
# Set default git provider in a custom config
repomate --config-file /custom/config.txt --set-default-provider github | gitlab

# Set custom config file location
repomate --set-config-file /custom/config.txt

Configuration File

The configuration file is a simple text file with one repository URL per line. For example:

https://github.com/user/repo1.git
https://github.com/user/repo2.git
https://github.com/organization/repo3.git

The file will be automatically created at ~/.config/alex-scripts/repomate/subscribed.txt if it doesn't exist.

Behavior

  • When syncing repositories:

    • If a repository doesn't exist locally, it will be cloned
    • If a repository exists locally, it will be updated (git pull)
    • Updates are performed on the 'main' branch
  • When adding repositories:

    • Duplicate repositories are not allowed
    • The URL is validated before adding
  • When removing repositories:

    • Only the repository URL is removed from the sync list
    • The local repository files are not deleted

Requirements

  • Ruby
  • Git
  • Fish shell (for fish function integration)

Help

To see all available options and commands:

repomate --help