A tool for running commands in parallel on a set of directories.
Take the shotgun approach to your terminal.
$ go get -u github.com/bbrks/shotgun
Imagine you're working on a system with 20, 50, 100, or more microservices, all in separate repositories. How do you update them all at once? Easy.
$ shotgun git pull
What about removing all local changes and syncing with the remote master branches?
$ shotgun 'git fetch origin; git reset --hard origin/master; git clean -f'
Not convinced yet? See just how fast running commands in parallel vs. sequentially actually is:
/* Shotgun is a tool for running commands in parallel on a set of directories. Usage: shotgun [options] command Options: -d directory Working directory - search from here (default ".") -f regexp Filter directories by RE2 regexp (default ".*") -c number Maximum number of concurrent commands (default 64) -v Print all lines of command output -dry Print what would be run where, without actually doing it -version Print version and exit Examples: shotgun git pull Run a command in each child directory of the current shotgun -f '^a' git pull Run a command in each directory beginning with the letter 'a' shotgun -d $GOPATH/src/github.com/bbrks git status --short Run a command for each directory in '$GOPATH/src/github.com/bbrks' shotgun 'git checkout -- .; git checkout develop; git fetch; git pull' Wrap commands in quotes and separate by semicolons to chain sequentially shotgun -dry 'rm .travis.yml' Print what would be run where */
This project is licensed under the MIT License.