This script allows you to clone all GitHub repositories from the command line using GitHub CLI. It can also be used as a tool for local repository backups by cloning repositories to your local machine.
- GitHub CLI installed and configured
- jq installed (for parsing JSON)
-
Clone this repository or download the
clone_repos.sh
script. -
Make the script executable:
chmod +x clone_repos.sh
-
Run the script:
./clone_repos.sh [--dir <directory>]
- If --dir option is provided, repositories will be cloned to the specified directory. If not provided, repositories will be cloned to the current directory.
-
Sit back and watch as the script clones the repositories for you!
Clone repositories to a specific directory:
./clone_repos.sh --dir ~/my_projects
- This script is currently written in Bash and may not be fully compatible with all operating systems.
- Consider rewriting it in a more cross-platform language like Python for broader compatibility.
- If you encounter any issues or have suggestions for improvements, feel free to open an issue.
PRs are welcome!
Happy cloning!