This script will batch clone all repos retrieved from a RESOURCEURL into the current directory that you're in.
This will prompt you for your github password.
Example Resource URLS:
https://api.github.com/user/repos
https://api.github.com/orgs/[ORGNAME]/repos?page=[PAGENUMBER]
I recommend storing this as a zsh or bash alias (i.e batch-clone ($1)
) where $1
is the RESOURCE URL
curl -u[USERNAMEHERE] -s [RESOURCEURL] | ruby -rjson -e 'JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["url"]} ]}'