{"id":27133180,"url":"https://github.com/cogniwave/gh-sync","last_synced_at":"2026-05-05T15:37:24.579Z","repository":{"id":284972365,"uuid":"956544610","full_name":"cogniwave/gh-sync","owner":"cogniwave","description":"This tool allows you to synchronize configurations (labels, workflows, rules, etc) between two GitHub repositories","archived":false,"fork":false,"pushed_at":"2025-04-07T22:40:59.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-17T13:06:21.634Z","etag":null,"topics":["automation","bun","devtools","github","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://cogniwave.gitbook.io/gh-sync","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cogniwave.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-03-28T12:39:42.000Z","updated_at":"2025-04-07T22:41:03.000Z","dependencies_parsed_at":"2025-03-28T17:45:48.588Z","dependency_job_id":"53123379-e10d-4c45-868c-6a00bba19613","html_url":"https://github.com/cogniwave/gh-sync","commit_stats":null,"previous_names":["cogniwave/gh-label-sync","cogniwave/gh-sync"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/cogniwave/gh-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cogniwave","download_url":"https://codeload.github.com/cogniwave/gh-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["automation","bun","devtools","github","npm-package","typescript"],"created_at":"2025-04-07T23:19:48.732Z","updated_at":"2026-02-27T03:33:29.485Z","avatar_url":"https://github.com/cogniwave.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-sync\n\n[![Latest version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![npm][npm-src]][npm-href] [![Publish workflow][publish-workflow-src]][publish-workflow-href] [![Documentation - Powered by GitBook][gitbook-src]][gitbook-href]\n\n- [✨ Release Notes](/CHANGELOG.md)\n- [📖 Documentation - powered by GitBook](https://cogniwave.gitbook.io/gh-sync)\n\n\nThis tool allows you to synchronize labels between two GitHub repositories. It retrieves the labels from a source repository and updates the labels in the target repository.\n\nIt requires a GitHub access token with the necessary permissions to manage labels on GitHub repositories.\n\n## Setup\n\n### Installation\n\nInstall it globally or locally with whatever package manager you use\n\n```bash\nnpm install -g @cogniwave/gh-sync\npnpm add -g @cogniwave/gh-sync\nyarn global add @cogniwave/gh-sync\nbun add @cogniwave/gh-sync\n```\n\n### Direct Execution with npx (or other runners)\n\nIf you prefer not to install the tool globally, you can run it directly using:\n\n```bash\nnpx @cogniwave/gh-sync\nbunx @cogniwave/gh-sync\nyarn dlx @cogniwave/gh-sync\npnpm @cogniwave/gh-sync\n```\n\n### Token\n\nBefore using the tool, you need to create a GitHub access token with the following required permissions:\n\n- **issues:read and write**: Used to get labels and create new ones\n- **pull requests:read and write**: Used to delete tokens in destination repository if you wish\n\n## Usage\n\nOnce you have your GitHub token, you can use the tool to sync labels between repositories.\n\n### Command Syntax\n\n```bash\n@cogniwave/gh-sync \u003corigin\u003e \u003ctarget\u003e [options]\n```\n\n### Arguments\n\n- `origin \u003cstring\u003e`: The repository from which you want to copy labels in the format of `{owner}/{repository}`\n- `target \u003cstring\u003e`: The repository where you want to update the labels in the format of `{owner}/{repository}`\n\n### Options\n\n- `--verbose`: Runs the tool in verbose mode, providing detailed logs about the operations being performed.\n- `-t, --token \u003cstring\u003e`: Auth token to allow gh-sync to do it's thing. Use this if the token is the same for both origin and destination repositories\"\n- `--token-origin`: Auth token of the origin repository, to allow gh-sync to do it's thing\n- `--token-destination`: Auth token of the destination repository, to allow gh-sync to do it's thing\n\n### Example Usage\n\n1. To synchronize labels from `repo-a` to `repo-b`:\n\n   ```bash\n   @cogniwave/gh-sync owner/repo-a owner/repo-b --token your_github_token\n   ```\n\n2. To synchronize labels from `repo-a` to `repo-b` with implicit token:\n\n   ```bash\n   export $GITHUB_TOKEN = your_github_token\n   @cogniwave/gh-sync owner/repo-a owner/repo-b\n   ```\n\n3. To synchronize labels from `repo-a` to `repo-b` but different tokens:\n\n   ```bash\n   @cogniwave/gh-sync owner/repo-a owner/repo-b --token-origin repo-a_token --token-destination repo-b_token\n   ```\n\n4. To run the tool in verbose mode:\n\n   ```bash\n   @cogniwave/gh-sync owner/repo-a owner/repo-b --verbose\n   ```\n\n## Development\n\n```bash\nbun install\n```\n\nTo run:\n\n```bash\nbun dev\n```\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/@cogniwave/gh-sync/latest.svg?style=flat\u0026colorA=020420\u0026colorB=00DC82\n[npm-version-href]: https://npmjs.com/package/@cogniwave/gh-sync\n[npm-downloads-src]: https://img.shields.io/npm/dm/@cogniwave/gh-sync.svg?style=flat\u0026colorA=020420\u0026colorB=00DC82\n[npm-downloads-href]: https://npm.chart.dev/@cogniwave/gh-sync\n[npm-src]: https://img.shields.io/npm/l/@cogniwave/gh-sync.svg?style=flat\u0026colorA=020420\u0026colorB=00DC82\n[npm-href]: https://npmjs.com/package/@cogniwave/gh-sync\n[publish-workflow-src]: https://img.shields.io/github/actions/workflow/status/cogniwave/gh-sync/publish.yml?branch=master\n[publish-workflow-href]: https://github.com/cogniwave/gh-sync/actions/workflows/publish.yml\n[gitbook-src]: https://img.shields.io/static/v1?message=Documented%20on%20GitBook\u0026logo=gitbook\u0026logoColor=ffffff\u0026label=%20\u0026labelColor=5c5c5c\u0026color=3F89A1\n[gitbook-href]: https://gitbook.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogniwave%2Fgh-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcogniwave%2Fgh-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogniwave%2Fgh-sync/lists"}