{"id":14155393,"url":"https://github.com/rm3l/gh-org-repo-sync","last_synced_at":"2025-03-26T21:32:36.686Z","repository":{"id":40336520,"uuid":"455361172","full_name":"rm3l/gh-org-repo-sync","owner":"rm3l","description":"GitHub CLI extension to clone (or update) all repositories in an Organization, with the ability to filter via search queries.","archived":false,"fork":false,"pushed_at":"2025-03-22T07:39:36.000Z","size":119,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T08:26:16.498Z","etag":null,"topics":["gh-extension","github","organization"],"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/rm3l.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-03T23:22:31.000Z","updated_at":"2025-03-22T07:39:33.000Z","dependencies_parsed_at":"2023-11-29T07:25:07.895Z","dependency_job_id":"9a063a79-a388-4cd5-9a3b-e6be176c6c24","html_url":"https://github.com/rm3l/gh-org-repo-sync","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fgh-org-repo-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fgh-org-repo-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fgh-org-repo-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fgh-org-repo-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm3l","download_url":"https://codeload.github.com/rm3l/gh-org-repo-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245739014,"owners_count":20664382,"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":["gh-extension","github","organization"],"created_at":"2024-08-17T08:03:01.031Z","updated_at":"2025-03-26T21:32:31.764Z","avatar_url":"https://github.com/rm3l.png","language":"Go","funding_links":["https://paypal.me/rm3l"],"categories":["github"],"sub_categories":[],"readme":"# gh-org-repo-sync\n\n[![Build](https://github.com/rm3l/gh-org-repo-sync/actions/workflows/build.yml/badge.svg)](https://github.com/rm3l/gh-org-repo-sync/actions/workflows/build.yml)\n[![Lint](https://github.com/rm3l/gh-org-repo-sync/actions/workflows/lint.yml/badge.svg)](https://github.com/rm3l/gh-org-repo-sync/actions/workflows/lint.yml)\n[![CodeQL Analysis](https://github.com/rm3l/gh-org-repo-sync/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/rm3l/gh-org-repo-sync/actions/workflows/codeql-analysis.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rm3l/gh-org-repo-sync)](https://goreportcard.com/report/github.com/rm3l/gh-org-repo-sync)\n\n\u003e GitHub CLI extension to clone all repositories in an Organization, with the ability to filter via search queries.\n\u003e If a local clone already exists, it fetches all remotes and pulls changes from the default branch.\n\n## Installation\n\n- Install the `gh` CLI. See [https://github.com/cli/cli#installation](https://github.com/cli/cli#installation) for further details.\n- If not done already, also install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n- To be able to clone private repos you have access to inside the Organization, authenticate with your GitHub account by running `gh auth login`. Alternatively, the CLI will respect the `GITHUB_TOKEN` [environment variable](https://cli.github.com/manual/gh_help_environment).\n- Install the extension:\n\n```bash\ngh extension install rm3l/gh-org-repo-sync\n```\n\n## Usage\n\n```bash\n❯ gh org-repo-sync -h\n\nUsage: gh org-repo-sync \u003corganization\u003e [options]\nOptions: \n  -batch-size int\n        the number of elements to retrieve at once. Must not exceed 100 (default 50)\n  -dry-run\n        dry run mode. to display the repositories that will get cloned or updated, \n        without actually performing those actions\n  -force\n        whether to force sync repositories.\n        Caution: this will hard-reset the branch of the destination repository to match the source repository.\n  -output string\n        the output path (default \".\")\n  -protocol string\n        the protocol to use for cloning. Possible values: system, ssh, https. (default \"system\")\n  -query string\n        GitHub search query, to filter the Organization repositories.\n        Example: \"language:Java stars:\u003e10 pushed:\u003e2010-11-12\"\n        See https://bit.ly/3HurHe3 for more details on the search syntax\n```\n\n## Working with the source code\n\n1. Clone the repository:\n\n```\ngit clone https://github.com/rm3l/gh-org-repo-sync\ncd gh-org-repo-sync\n```\n\n2. Download and install [Go](https://go.dev/doc/install) to build the project.\n   Or if you are already using the [asdf](https://asdf-vm.com/) version manager, you can just run `asdf install` to install all the necessary tools (declared in the [.tool-versions](.tool-versions) file).\n\n3. Install the local version of this extension; `gh` symlinks to your local source code directory.\n\n```bash\n# Install the local version\ngh extension install .\n```\n\n4. At this point, you can start using it:\n\n```bash\ngh org-repo-sync \u003cmy-organization\u003e\n```\n\n5. To see changes in the code as you develop, simply build and use the extension\n\n```bash\ngo build \u0026\u0026 gh org-repo-sync \u003cmy-organization\u003e\n```\n\n## Contribution Guidelines\n\nContributions and issue reporting are more than welcome. So to help out, do feel free to fork this repo and open up a pull request.\nI'll review and merge your changes as quickly as possible.\n\nYou can use [GitHub issues](https://github.com/rm3l/gh-org-repo-sync/issues) to report bugs.\nHowever, please make sure your description is clear enough and has sufficient instructions to be able to reproduce the issue.\n\n## Developed by\n\n* Armel Soro\n    * [keybase.io/rm3l](https://keybase.io/rm3l)\n    * [rm3l.org](https://rm3l.org) - \u0026lt;armel+gh-org-repo-sync@rm3l.org\u0026gt; - [@rm3l](https://twitter.com/rm3l)\n    * [paypal.me/rm3l](https://paypal.me/rm3l)\n    * [coinbase.com/rm3l](https://www.coinbase.com/rm3l)\n\n## License\n\n    The MIT License (MIT)\n\n    Copyright (c) 2022 Armel Soro\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm3l%2Fgh-org-repo-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm3l%2Fgh-org-repo-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm3l%2Fgh-org-repo-sync/lists"}