github-clone-all

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2017 License: MIT Imports: 14 Imported by: 0

README

Clone all matching repos on GitHub

github-clone-all is a command to clone all repositories matching to given query and language via GitHub Search API It clones many repositories in parallel. Please see -help option to know all flags.

Query is the same as GitHub search syntax. And 'stars>1 fork:false' is added by default for sensible search results.

Repository is cloned to 'dest' directory. It is $cwd/repos by default and can be specified with -dest flag. And in order to reduce size of cloned repositories, -extract option is available. -extract only leaves files matching to given regular expression.

Because of restriction of GitHub search API, max number of results is 1000. And you need to gain GitHub API token in advance. github-clone-all will refer the token via -token flag or $GITHUB_TOKEN environment variable.

Installation

Use go get or released binaries (not yet).

$ go get github.com/rhysd/github-clone-all

Example

$ github-clone-all -token $GITHUB_TOKEN -lang vim -extract '(\.vim|vimrc)$'

It clones first 1000 repositories whose language is 'vim' into 'repos' directory in the current working directory.

How to get GitHub API token

  1. Visit https://github.com/settings/tokens in a browser
  2. Click 'Generate new token'
  3. Add token description
  4. Without checking any checkbox, click 'Generate token'
  5. Key is shown in your tokens list

License

MIT license

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL