ghpm is a powerful utility that lets you orchestrate batch operations across all your GitHub projects:
- Clone all your repositories or any other user's repos in one go.
- Use it to push, pull, and conduct any other operation on all your projects simultaneously.
I have a lot of repos on my GitHub and maintaining them was becoming a pain, also this makes moving my work to a new machine really smooth.
Before you begin, ensure you have met the following requirements:
- You have a working Go environment.
- Cloning self repos requires authentication and uses the GitHub CLI (
gh
).
To install ghpm, follow these steps:
go install github.com/sanurb/ghpm@latest
ghpm
This will open up the self guided menu with a list of operations you can perform.
You can use option 3 to run any command in all your GitHub repos, very useful for push, pull and similar commands.
ghpm was built using Go
Figuring out the GitHub api and authentication was a challenge, I used gh
to do some heavy lifting.
- Go best practices for command-line tools.
- Utilizing Go modules for clean, efficient dependency management.
- Leveraging interfaces and concurrency for scalable script design.
Hit the ⭐ button if you found this useful.