{"id":28187798,"url":"https://github.com/louishuyng/sync-rpc-proto","last_synced_at":"2025-10-04T13:57:17.055Z","repository":{"id":57891401,"uuid":"528912353","full_name":"louishuyng/sync-rpc-proto","owner":"louishuyng","description":"This is a script to help collect schema from one centralized repo and sync to the project use that schema","archived":false,"fork":false,"pushed_at":"2022-09-02T07:12:26.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T07:37:04.925Z","etag":null,"topics":["rpc","schema","script"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/louishuyng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-25T15:32:45.000Z","updated_at":"2024-10-13T07:45:54.000Z","dependencies_parsed_at":"2023-01-17T18:15:17.716Z","dependency_job_id":null,"html_url":"https://github.com/louishuyng/sync-rpc-proto","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/louishuyng/sync-rpc-proto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishuyng%2Fsync-rpc-proto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishuyng%2Fsync-rpc-proto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishuyng%2Fsync-rpc-proto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishuyng%2Fsync-rpc-proto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louishuyng","download_url":"https://codeload.github.com/louishuyng/sync-rpc-proto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishuyng%2Fsync-rpc-proto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278322146,"owners_count":25967874,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"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":["rpc","schema","script"],"created_at":"2025-05-16T08:10:44.541Z","updated_at":"2025-10-04T13:57:17.017Z","avatar_url":"https://github.com/louishuyng.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Description\n\nThis program makes developer easily to `sync and generate code in any language based on proto` from **_git remote repo_** or **_defined in local directory_** through `configuration yaml file`\n\n## Installation\n\n### macOS using Homebrew\n\n```sh\nbrew tap louishuyng/sync-rpc-proto \u0026\u0026 brew install sync-proto\n```\n\n## Usage\n\nFirst you need to define `protodep.yaml` file. [See instruction below](#configuration-file)\n\n- Running with `protodep.yaml` defined in **_current directory_** that script execution\n\n```bash\nsync-proto\n```\n\n- Running with `yaml file` defined in **_other directory_** that script execution\n\n```bash\nsync-proto -f other_dirctory/custom.yaml\n```\n\n- Running with mode `local` (the default mode is `remote`)\n\n```bash\nsync-proto -m local\n```\n\n## Configuration File\n\n```yaml\nsource: grpc-proto-repo\nbranch: main\noutpb: app/grpc/pb\noutdir: app/grpc/rpc_pb\ntoken_key: GH_PROTO_REPO_TOKEN\ndependencies:\n  - auth/jwt\n  - user/login_signup\ncommand: python -m grpc_tools.protoc -I./$outpb --python_out=./$outdir --grpc_python_out=./$outdir $dependency.proto\n```\n\n`source`\n\nThe **_github remote url_** that including your proto files\n\n`branch`\n\nThe branch you want to download proto and sync (for best practice `branch` can be use to separate environment)\n\n`outpb`\n\nThe directory proto will be downloaded from `source`\n\n`outdir`\n\nThe directory code will be generate based on proto after running script\n\n`token_key`\n\nThe github token key set in (`.env` file or set as `environment variable`) get based on this [instruction](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\n\n`dependencies`\n\nThe list proto you want to sync from `source`\n\n- In remote git we have folder like below\n  ```\n  ├── auth\n  │   ├── jwt.proto\n  ├── user\n  │   ├── login_signup.proto\n  ```\n- Then if we want to sync jwt proto and login_signup.proto we can define the array value like below in configuration file\n\n  ```yaml\n  dependencies:\n    - auth/jwt\n    - user/login_signup\n  ```\n\n`command`\n\nThe command to generate a code it be differently in each language.\n\nIn command script we can use `$outpb` `$outdir` and `$dependency` to reflect with the key already defined in configuration file.\n\nBased on above configuration we will replace the value like below:\n\n- `$outpb` =\u003e `app/grpc/pb`\n- `$outpb` =\u003e `app/grpc/pb`\n- `$dependency` =\u003e `auth/jwt` and `user/login_signup` in each iteration\n\n#### Note: In local mode\n\n- We can ignore keys `source`, `branch` and `token_key`\n\n## Roadmap\n\n- Remove `command` and add `language` key to detect context running script\n\n## Support\n\nFor support, email huynguyennbk@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouishuyng%2Fsync-rpc-proto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouishuyng%2Fsync-rpc-proto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouishuyng%2Fsync-rpc-proto/lists"}