8000 GitHub - samlader/gmux at v0.1.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ gmux Public

CLI tool to manage & automate repetitive Git workflows across multiple Github repositories.

License

Notifications You must be signed in to change notification settings

samlader/gmux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gmux

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. ⚡

Installation

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

Usage

1. Initialize a New Directory

Use the init command to create a new working directory for gmux, along with a pull request template:

gmux init --directory=<directory_name>

2. Clone Repositories

Clone all repositories from a specified GitHub organization or user:

gmux clone --org=<organization_or_user> [--filter=<regex_filter>]

3. Dynamic Git Commands Across Repositories

Execute any Git command for all repositories. Dynamic variables for each repository can be used.

gmux git [GIT_COMMAND] [--filter FILTER]

Dynamic Variables

  • @default: The default branch of a repository

  • @current: The current branch of the repository

6. Arbitrary Commands Across Repositories

Execute a command in each repository. Useful for batch operations across multiple projects.

gmux cmd [COMMAND] [--filter FILTER]

7. Create Pull Requests

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

Example template

## Overview

This is a summary of the changes for {{ repository_name }}.

## Changes

{% for diff_file in diff_files %}
- {{ diff_file }}
{% endfor %}

Examples

# 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

Contributions and bug reports are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License.

About

CLI tool to manage & automate repetitive Git workflows across multiple Github repositories.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0