{"id":20940801,"url":"https://github.com/bbrks/shotgun","last_synced_at":"2025-05-13T23:30:46.236Z","repository":{"id":57579454,"uuid":"70102108","full_name":"bbrks/shotgun","owner":"bbrks","description":"💥 A tool for running commands in parallel on a set of directories","archived":false,"fork":false,"pushed_at":"2022-10-18T09:08:59.000Z","size":39,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T23:05:31.787Z","etag":null,"topics":["command-line","command-line-tool","go","golang","golang-tools","shell","utility"],"latest_commit_sha":null,"homepage":"","language":"Go","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/bbrks.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-10-05T21:49:02.000Z","updated_at":"2024-09-14T19:38:40.000Z","dependencies_parsed_at":"2023-01-20T03:46:37.137Z","dependency_job_id":null,"html_url":"https://github.com/bbrks/shotgun","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbrks%2Fshotgun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbrks%2Fshotgun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbrks%2Fshotgun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbrks%2Fshotgun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbrks","download_url":"https://codeload.github.com/bbrks/shotgun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043215,"owners_count":22004911,"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":["command-line","command-line-tool","go","golang","golang-tools","shell","utility"],"created_at":"2024-11-18T23:11:59.018Z","updated_at":"2025-05-13T23:30:45.976Z","avatar_url":"https://github.com/bbrks.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [![Shotgun Logo](https://cdn.rawgit.com/bbrks/shotgun/master/logo.svg)](https://github.com/bbrks/shotgun)\n\nA tool for running commands in parallel on a set of directories.\n\n[![Build Status](https://travis-ci.org/bbrks/shotgun.svg)](https://travis-ci.org/bbrks/shotgun)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bbrks/shotgun)](https://goreportcard.com/report/github.com/bbrks/shotgun)\n[![GitHub tag](https://img.shields.io/github/tag/bbrks/shotgun.svg)](https://github.com/bbrks/shotgun/releases)\n[![license](https://img.shields.io/github/license/bbrks/shotgun.svg)](https://github.com/bbrks/shotgun/blob/master/LICENSE)\n\nTake the shotgun approach to your terminal. :boom:\n\n## Installation/Updating\n\n```sh\n$ go install github.com/bbrks/shotgun@latest\n```\n\n## Why?\n\nImagine you're working on a system with 20, 50, 100, or more microservices, all in separate repositories.\nHow do you update them all at once? Easy.\n\n```sh\n$ shotgun git pull\n```\n\nWhat about removing all local changes and syncing with the remote master branches?\n\n```sh\n$ shotgun 'git fetch origin; git reset --hard origin/master; git clean -f'\n```\n\nNot convinced yet? See just how fast running commands in parallel vs. sequentially actually is:\n\n\u003ca href=\"https://asciinema.org/a/d3kj4vdi47orpl5tleqn0c9rx\" target=\"_blank\"\u003e\u003cimg src=\"http://i.imgur.com/7xqA67x.gif\" width=\"250px\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://asciinema.org/a/b0d16ry57hsn1vfmq2ez7u1an\" target=\"_blank\"\u003e\u003cimg src=\"http://i.imgur.com/e9T6YY0.gif\" width=\"250px\"/\u003e\u003c/a\u003e\n\n## Usage\n\n[embedmd]:# (doc.go /\\/\\*/ /\\*\\//)\n```go\n/*\n\nShotgun is a tool for running commands in parallel on a set of directories.\n\nUsage:\n\tshotgun [options] command\n\nOptions:\n\t-d directory\n\t\tWorking directory - search from here (default \".\")\n\t-f regexp\n\t\tFilter directories by RE2 regexp (default \".*\")\n\t-c number\n\t\tMaximum number of concurrent commands (default 64)\n\t-v\n\t\tPrint all lines of command output\n\t-dry\n\t\tPrint what would be run where, without actually doing it\n\t-version\n\t\tPrint version and exit\n\nExamples:\n\tshotgun git pull\n\t\tRun a command in each child directory of the current\n\n\tshotgun -f '^a' git pull\n\t\tRun a command in each directory beginning with the letter 'a'\n\n\tshotgun -d $GOPATH/src/github.com/bbrks git status --short\n\t\tRun a command for each directory in '$GOPATH/src/github.com/bbrks'\n\n\tshotgun 'git checkout -- .; git checkout develop; git fetch; git pull'\n\t\tWrap commands in quotes and separate by semicolons to chain sequentially\n\n\tshotgun -dry 'rm .travis.yml'\n\t\tPrint what would be run where\n\n*/\n```\n\n## License\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbrks%2Fshotgun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbrks%2Fshotgun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbrks%2Fshotgun/lists"}