A simple command-line tool designed to automate repetitive Git workflows across multiple repositories.
Common tasks such as cloning repositories, committing changes and generating pull requests are dynamically executed in parallel - enabling you to ship changes at lightning speed. ⚡
Before using gmux, make sure you have the required dependencies installed:
# brew install git
git --version
# brew install gh
gh --version
Install gmux using the following command:
pip3 install https://github.com/samlader/gmux/archive/refs/tags/v0.0.1.zip
Use the init command to create a new working directory for gmux, along with a pull request template:
gmux init --directory=<directory_name>
Clone all repositories from a specified GitHub organization or user:
gmux clone --org=<organization_or_user> [--filter=<regex_filter>]
Execute any Git command for all repositories. Dynamic variables for each repository can be used.
gmux git [GIT_COMMAND] [--filter FILTER]
-
@default: The default branch of a repository
-
@current: The current branch of the repository
Execute a command in each repository. Useful for batch operations across multiple projects.
gmux cmd [COMMAND] [--filter FILTER]
Create pull requests for each repository:
gmux pr
Pull requests use the template (PR_TEMPLATE.md
) created in the root directory by default.
The template supports Jinja expressions and has the following context provided:
- repository_name: Name of the repository
- diff_files: Files with changes against the base branch
## Overview
This is a summary of the changes for {{ repository_name }}.
## Changes
{% for diff_file in diff_files %}
- {{ diff_file }}
{% endfor %}
# Initialize a new directory
gmux init
# Clone service repositories from the organization "example-org"
gmux clone --org=example-org --filter="*-service"
# Create a new branch, `feature-branch`, on all repositories
gmux git checkout -b feature-branch
# Make code modifications
codemod -m --extensions html \
'<font *color="?(.*?)"?>(.*?)</font>' \
'<span style="color: \1;">\2</span>'
# Commit changes
gmux git commit -m "Implement new feature"
# Create pull requests for all repositories
gmux pr
Contributions and bug reports are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.