Show HN: Clone all of your GitHub repos at once
github.com
github.com
curl https://api.github.com/users/[username]/repos | jq .[].clone_url | xargs -n 1 git clone
Only works for public repos though.Personally, I prefer python solutions to shell solutions, since its easier to maintain / add features.
https://api.github.com/orgs/[orgname]/repos
instead.Edit: It now supports tokens supplied with a "--token" argument.
* work with orgs
* pull if clone already existsGetting a user's organization repos is something I will also add to the queue.
Edit: We now run a git pull in repos by default and it can be disabled with a "--nopull" argument.
I usually lay out my directories putting everything under ~/git/, and then I'll have ~/git/js, ~/git/c, ~/git/python, and so on.
It could probably be done through some kind of ruleset file we go through that maps conditions to directories. I'll think about it, but I'm not sure there's enough demand. If you do this in fork, I'd be willing to take it.