https://github.com/caarlos0/clone-org
Clone all repos of a github organization
https://github.com/caarlos0/clone-org
git github-api golang
Last synced: 7 months ago
JSON representation
Clone all repos of a github organization
- Host: GitHub
- URL: https://github.com/caarlos0/clone-org
- Owner: caarlos0
- License: mit
- Created: 2016-09-20T13:56:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-14T08:25:07.000Z (8 months ago)
- Last Synced: 2025-03-30T11:11:17.107Z (7 months ago)
- Topics: git, github-api, golang
- Language: Go
- Size: 260 KB
- Stars: 77
- Watchers: 3
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# clone-org
[](https://github.com/caarlos0/clone-org/releases/latest)
[](LICENSE.md)
[](https://github.com/caarlos0/clone-org/actions?workflow=build)
[](https://goreportcard.com/report/github.com/caarlos0/clone-org)
[](http://godoc.org/github.com/caarlos0/clone-org)
[](https://github.com/goreleaser)
A simple command line tool to clone all repos of a given organization.
I needed to do that so I can `grep` all repos for some stuff. GitHub search
wasn't powerful enough to do what I needed, so, here it is.
## Usage
```
NAME:
clone-org - Clone all repos of a github organization
USAGE:
clone-org [global options] command [command options] [arguments...]
VERSION:
master
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--org value, -o value
--token value, -t value [$GITHUB_TOKEN]
--destination value, -d value
--help, -h show help
--version, -v print the version
```
## Notes
* if no destination is provided, the clone will be made in
`/tmp/organization-name`
* a `git clone --depth 1` will be performed, meaning that only the last commit
of the default branch will be available. On future versions this may be
configurable.
## Install
**go**:
```sh
go install -v github.com/caarlos0/clone-org/cmd/clone-org@latest
```
**homebrew**:
```sh
brew install caarlos0/tap/clone-org
```
**macports**:
```sh
sudo port install clone-org
```
**snap**:
```sh
snap install clone-org
```
**apt**:
```sh
echo 'deb [trusted=yes] https://repo.caarlos0.dev/apt/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
sudo apt update
sudo apt install clone-org
```
**yum**:
```sh
echo '[caarlos0]
name=caarlos0
baseurl=https://repo.caarlos0.dev/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/caarlos0.repo
sudo yum install clone-org
```
**deb/rpm/apk**:
Download the `.apk`, `.deb` or `.rpm` from the [releases page][releases] and install with the appropriate commands.
**manually**:
Download the pre-compiled binaries from the [releases page][releases] or clone the repo build from source.
[releases]: https://github.com/caarlos0/clone-org/releases
## Stargazers over time
[](https://starchart.cc/caarlos0/clone-org)