Batch operations for GitHub repositories using the gh CLI.
npm install -g gh-batchOr clone and link locally:
git clone https://github.com/ElJijjuna/gh-batch.git
cd gh-batch
npm linkClones all repositories from a GitHub user or organization, one folder per repository.
gh-batch clone repos <owner> [-y] [-p <path>]Arguments
| Argument | Description |
|---|---|
<owner> |
GitHub username or organization name |
Options
| Option | Description |
|---|---|
-y, --yes |
Skip the confirmation prompt and clone immediately |
-p, --path <path> |
Destination directory (default: current directory) |
Examples
Prompt before cloning:
gh-batch clone repos ElJijunaRepositories for ElJijuna:
1. repo-one
2. repo-two
3. repo-three
Do you want to clone 3 repositories? (yes/no): yes
Cloning 3 repositories into /home/user/projects...
repo-one... done
repo-two... done
repo-three... done
Done: 3 cloned, 0 failed.
Skip the prompt and clone into a specific directory:
gh-batch clone repos ElJijuna -y -p ~/projectsRuns git fetch --all --prune on all locally cloned repositories from a GitHub owner. Detects repos by checking their origin remote URL.
gh-batch refresh repos <owner> [-p <path>]Arguments
| Argument | Description |
|---|---|
<owner> |
GitHub username or organization name |
Options
| Option | Description |
|---|---|
-p, --path <path> |
Directory to search for cloned repos (default: current directory) |
Examples
gh-batch refresh repos ElJijunaFetching 3 repositories from ElJijuna...
repo-one... done
repo-two... done
repo-three... done
Done: 3 fetched, 0 failed.
gh-batch refresh repos ElJijuna -p ~/projectsCommits must follow the Conventional Commits spec. Releases and the CHANGELOG are generated automatically on every push to main.
| Prefix | Triggers |
|---|---|
feat: |
minor version bump |
fix: |
patch version bump |
BREAKING CHANGE: (in footer) |
major version bump |
chore:, docs:, refactor: |
no release |
MIT