{"id":13897540,"url":"https://github.com/agilecreativity/github-cloner","last_synced_at":"2025-07-17T14:32:14.333Z","repository":{"id":56874305,"uuid":"55579518","full_name":"agilecreativity/github-cloner","owner":"agilecreativity","description":"Clone/list multiple Github repositories for a given user/organization including private repos easily.","archived":true,"fork":false,"pushed_at":"2021-05-08T14:41:44.000Z","size":19,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-11T02:07:09.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agilecreativity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-06T05:55:11.000Z","updated_at":"2025-03-21T03:27:18.000Z","dependencies_parsed_at":"2022-08-20T22:30:30.378Z","dependency_job_id":null,"html_url":"https://github.com/agilecreativity/github-cloner","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/agilecreativity/github-cloner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fgithub-cloner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fgithub-cloner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fgithub-cloner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fgithub-cloner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agilecreativity","download_url":"https://codeload.github.com/agilecreativity/github-cloner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fgithub-cloner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265616784,"owners_count":23798896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T18:03:40.583Z","updated_at":"2025-07-17T14:32:14.094Z","avatar_url":"https://github.com/agilecreativity.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"## GithubCloner\n\nExport/clone Github repository (public/private) by user or organization name\n\n[![Gem Version](https://badge.fury.io/rb/github-cloner.svg)][gem]\n[![Dependency Status](https://gemnasium.com/agilecreativity/github-cloner.png)][gemnasium]\n\n[gem]: http://badge.fury.io/rb/github-cloner\n[gemnasium]: https://gemnasium.com/agilecreativity/github-cloner\n\n### Start with Why\n\n- Be able to get grab all of interesting codes from a given user quickly\n- Be able to clone specific language for a given user/organization\n- Be able to clone all of organization/users in one go if desired\n- Be able to clone private/public repositories for a given user/organization\n- Be able to learn quickly or look at how something works from the source code\n- I am too lazy to do this manually or through some other shell script\n\n### Installation\n\n```sh\n# Install the gem\ngem install github-cloner\n\n# refresh your gem just in case\nrbenv rehash\n\n# Get list of options just type the name of the gem\ngithub-cloner\n```\n\nYou should see something like\n\n```\nUsage: github-cloner [options]\n\nSpecific options:\n    -b, --base-dir BASE_DIR          where BASE_DIR is the directory where the repositories will be cloned to (mandatory)\n                                     If not specified, current directory will be used\n    -u, --user USER                  The Github USER that will be cloned from (mandatory)\n    -o, --org [ORG]                  The Github's organization name to be used if specified (optional)\n                                     where ORG is the organization that the user belongs to\n    -t, --oauth-token [OAUTH_TOKEN]  The Github's oauth_token for authentication (optional - only required to list/clone private repositories)\n                                     where OAUTH_TOKEN is from the user's Github setting\n    -l, --language [LANG]            Clone only project of type LANG (optional)\n                                     where LANG is main language as shown on Github\n    -a, --[no-]all-repos             All repository only (optional)\n                                     default to original/non-forked repositories only\n    -c, --[no-]clone                 Clone the repositories to the path specified (optional)\n                                     default to --no-clone e.g. dry-run only\n\nCommon options:\n    -h, --help                       Show this message\n```\n\n- List repositories by user or organization id\n\n```sh\n# List all original/non-forked repositories by `awesome_user`\n$github-cloner --user awesome_user\n\n## List all original/non-forked repositories of a user `awesome_user` that belongs to `AwesomeCo`\n$github-cloner --user awesome_user --org AwesomeCo\n\n## List all origina/non-forked repositories by user `awesome_user` including private repository\n# Note: for this to work you will need to have the proper access with the right token\n$github-cloner --user awesome_user --oauth-token GITHUB_TOKEN_FOR_THIS_USER\n\n## List all repositories by user `awesome_user` include forked repositories\n$github-cloner --user awesome_user --oauth-token GITHUB_TOKEN_FOR_THIS_USER\n```\n\n- List and clone repositories by user or organization id using `--clone` option\n\n```sh\n## Clone all original (non-fork) public `JavaScript` repositores for user `awesome_user` to `~/Desktop/github`\n# Note: --base-dir is optional, if not specified then the current directory will be used\n#       --languages must be quoted if the value include any spaces e.g. \"Emacs Lisp\" for this to to work properly\n$github-cloner --user awesome_user \\\n               --base-dir ~/Desktop/github \\\n               --languages \"JavaScript\" \\\n               --clone\n\n## Clone all public/private repositories for `awesome_user` which are member of `AwesomeCo` organization to `~/Desktop/github`\n# Note: the option `--all` to include all forked repositories\n$github-cloner --user awesome_user \\\n               --org AwesomeCo \\\n               --all-repos \\\n               --base-dir ~/Desktop/github \\\n               --oauth-token GITHUB_TOKEN_FOR_AWESOME_USER \\\n               --clone\n\n## Clone specific type of projects (e.g. `Java` and `Emacs Lisp` in this case) public/private repositories for `awesome_user`\n## which are member of `AwesomeCo` organization to `~/Desktop/github`\n$github-cloner --user awesome_user \\\n               --org AwesomeCo \\\n               --all-repos \\\n               --languages \"Java,Emacs Lisp\" \\\n               --base-dir ~/Desktop/github \\\n               --oauth-token GITHUB_TOKEN_FOR_AWESOME_USER \\\n               --clone\n```\n\n### Example Sessions\n\n- List repositories by a given user (dry-run)\n\n```\n$github-cloner -b ~/Desktop/projects -u littlebee -l Ruby\n------------------------------------------\nList of languages by littlebee\nMakefile\nCoffeeScript\nRuby\nJavaScript\nArduino\n------------------------------------------\n------------------------------------------\nList of all repositories by littlebee\n1/15: littlebee/Makefile/arduino-mk\n2/15: littlebee/CoffeeScript/bumble-build\n3/15: littlebee/CoffeeScript/bumble-docs\n4/15: littlebee/CoffeeScript/bumble-strings\n5/15: littlebee/CoffeeScript/bumble-test\n6/15: littlebee/CoffeeScript/bumble-util\n7/15: littlebee/CoffeeScript/git-log-utils\n8/15: littlebee/CoffeeScript/git-status-utils\n9/15: littlebee/CoffeeScript/git-time-machine\n10/15: littlebee/CoffeeScript/notjs\n11/15: littlebee/CoffeeScript/publish\n12/15: littlebee/CoffeeScript/react-focus-trap-amd\n13/15: littlebee/Ruby/got\n14/15: littlebee/JavaScript/selectable-collection\n15/15: littlebee/Arduino/solar-sunflower\n------------------------------------------\nFYI: dry-run only, no action taken!!\nProcess 1 of 1 : git clone git@github.com:littlebee/got.git /Users/bchoomnuan/Desktop/projects/Ruby/littlebee/got\n```\n\n- List and clone repositories for a given user (e.g. `--clone` option used)\n\n```\n$github-cloner -b ~/Desktop/projects -u littlebee -l Ruby -c\n------------------------------------------\nList of languages by littlebee\nMakefile\nCoffeeScript\nRuby\nJavaScript\nArduino\n------------------------------------------\n------------------------------------------\nList of all repositories by littlebee\n1/15: littlebee/Makefile/arduino-mk\n2/15: littlebee/CoffeeScript/bumble-build\n3/15: littlebee/CoffeeScript/bumble-docs\n4/15: littlebee/CoffeeScript/bumble-strings\n5/15: littlebee/CoffeeScript/bumble-test\n6/15: littlebee/CoffeeScript/bumble-util\n7/15: littlebee/CoffeeScript/git-log-utils\n8/15: littlebee/CoffeeScript/git-status-utils\n9/15: littlebee/CoffeeScript/git-time-machine\n10/15: littlebee/CoffeeScript/notjs\n11/15: littlebee/CoffeeScript/publish\n12/15: littlebee/CoffeeScript/react-focus-trap-amd\n13/15: littlebee/Ruby/got\n14/15: littlebee/JavaScript/selectable-collection\n15/15: littlebee/Arduino/solar-sunflower\n------------------------------------------\nProcess 1 of 1 : git clone git@github.com:littlebee/got.git /Users/bchoomnuan/Desktop/projects/Ruby/littlebee/got\n```\n\n### TODO\n\n- [ ] Replace system call with the ruby library like [grit](https://github.com/mojombo/grit) or something similar\n- [ ] Allow the `https` when performing the clone\n\n### Related Projects\n\n- [github_cloner](https://github.com/nashby/github_cloner) by Vasiliy Ermolovich\n\n### Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n[Thor]: https://github.com/erikhuda/thor\n[Minitest]: https://github.com/seattlerb/minitest\n[RSpec]: https://github.com/rspec\n[Guard]: https://github.com/guard/guard\n[Yard]: https://github.com/lsegal/yard\n[Pry]: https://github.com/pry/pry\n[Rubocop]: https://github.com/bbatsov/rubocop\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fgithub-cloner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagilecreativity%2Fgithub-cloner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fgithub-cloner/lists"}