neighbor
neighbor is a tool for cloning a set of repositories from GitHub specified by a
GitHub Search Query
and running a cli command or executable binary, concurrently.
Background
neighbor aims to offload the work of cloning a set of repositories and executing
a cli command or executable binary on each of the cloned repositories, so that developers
and researchers can focus on what they are actually trying to accomplish.
How does neighbor save developers and researchers time?
- Abstracting GitHub API interaction (searching and cloning)
- Abstracting concurrency
Requirements
Getting Started
-
Installing the project
go get -u github.com/mccurdyc/neighbor/...
-
Usage
make build
./bin/neighbor --query="org:neighbor-projects NOT minikube" --external_command="ls -al"
Usage: neighbor (--file=<config-file> | --query=<github-query> --external_command=<command>) [--access_token=<github-access-token>] [--search_type=<repository|code>] [--clean=<true|false>]
-access_token string
Your personal GitHub access token. This is required to access private repositories and increases rate limits.
-alsologtostderr
log to standard error as well as files
-clean
Delete the directory created for each repository after running the external command against the repository. (default true)
-external_command string
The command to execute on each project returned from the GitHub search query.
-file string
Absolute filepath to the config file.
-help
Print this help menu.
-log_backtrace_at value
when logging hits line file:N, emit a stack trace
-log_dir string
If non-empty, write log files in this directory
-logtostderr
log to standard error instead of files
-query string
The GitHub search query to execute.
-search_type string
The type of GitHub search to perform. (default "repository")
-stderrthreshold value
logs at or above this threshold go to stderr
-v value
log level for V logs
-vmodule value
comma-separated list of pattern=N settings for file-filtered logging
Executing a Cli Command/Executable Binary
neighbor allows you to specify an executable binary to be run on
a per-repository basis with each repository as the working directory.
Examples can be found in the examples.
FAQ
What about private repositories?
Generate a GitHub Personal Access Token
neighbor uses token authentication for communicating and authenticating with GitHub.
To read more about GitHub's token authentication, visit this site.
You can create a personal access token and use it in place of a password when performing Git operations over HTTPS with Git on the command line or the API.
Authentication is required to both increase the GitHub API limitations
as well as access private content (e.g., repositories, gists, etc.).
License