{"id":47841268,"url":"https://github.com/anfema/grpc-code-generator","last_synced_at":"2026-04-03T20:40:14.131Z","repository":{"id":33843581,"uuid":"110571930","full_name":"anfema/grpc-code-generator","owner":"anfema","description":"A TypeScript definition file generator for gRPC services","archived":false,"fork":false,"pushed_at":"2023-04-19T12:21:13.000Z","size":1187,"stargazers_count":7,"open_issues_count":8,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-13T04:58:06.261Z","etag":null,"topics":["beta","grpc","grpc-node","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/anfema.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-13T16:22:07.000Z","updated_at":"2022-04-19T12:18:06.000Z","dependencies_parsed_at":"2023-02-18T03:31:08.757Z","dependency_job_id":null,"html_url":"https://github.com/anfema/grpc-code-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anfema/grpc-code-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anfema%2Fgrpc-code-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anfema%2Fgrpc-code-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anfema%2Fgrpc-code-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anfema%2Fgrpc-code-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anfema","download_url":"https://codeload.github.com/anfema/grpc-code-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anfema%2Fgrpc-code-generator/sbom","scorecard":{"id":195708,"data":{"date":"2025-08-11","repo":{"name":"github.com/anfema/grpc-code-generator","commit":"817a71e4afe10b8e27f4c37caa55781539fac363"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: License.md:0","Info: FSF or OSI recognized license: MIT License: License.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T21:47:22.597Z","repository_id":33843581,"created_at":"2025-08-16T21:47:22.597Z","updated_at":"2025-08-16T21:47:22.597Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31375775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["beta","grpc","grpc-node","typescript"],"created_at":"2026-04-03T20:40:13.339Z","updated_at":"2026-04-03T20:40:14.013Z","avatar_url":"https://github.com/anfema.png","language":"TypeScript","readme":"grpc-code-generator\n===\n\nA code generator for gRPC/protobuf `.proto` files. Contains templates for generating Typescript definitions for the plain callback/streams based API for [grpc-node](https://github.com/grpc/grpc-node) and protobuf message types.\n\n\nRunning\n---\n```sh\n$ yarn/npm run grpc-code-generator [options] path/to/main.proto [path/to/another.proto]\n```\n\nOptions can be specified on the command line or in a config file. If both are present, the command line options take precedence.\n\nOptions:\n```\n-o  --out \u003cout_dir\u003e\n\n    Output directory (default: src-gen/)\n\n-I  --proto_path \u003cinclude_dir\u003e     \n\t\n    Root path for resolving imports (may be specified multiple times, default: current working dir)\n\n-t  --templates \u003ctemplate1\u003e [\u003ctemplate2\u003e …]\n\n    Path to template modules used for generating code (default: builtin templates)\n\n-c  --config \u003cfile\u003e\n\n    Path to JSON config file.\n```\n\nConfig file\n```\n{\n\t\"out\": \"\u003cout_dir\u003e\",\n\t\"proto_paths\": [\n\t\t\"\u003cdir1\u003e\",\n\t\t\"\u003cdir2\u003e\"\n\t],\n\t\"files\": [\n\t\t\"path/to/main.proto\",\n\t\t\"path/to/another.proto\",\n\t]\n}\n```\n\nGenerated files\n---\n| File                                     | Content                           |\n|------------------------------------------|-----------------------------------|\n|`/\u003cpackage\u003e/index.d.ts`                   | Interfaces for message types        |\n|`/\u003cpackage\u003e/\u003cServiceName\u003e/grpc-node.d.ts` | Client/server typings with standard grpc-node interface |\n|`/message-base.d.ts`                      | Base message type with constructor |\n|`/grpc.d.ts`                              | Object with constructor functions for messages and service descriptions (what `grpc.load()` returns) |\n\n\nUsage\n---\nParametrize your grpc-node's `load()` function with the generated type description:\n\n```ts\nimport { load } from 'grpc';\n// Service type description for grpc.load()\nimport Description from './gen/grpc';\n\nconst grpc = load\u003cDescription\u003e('src/tests/proto/test.proto');\n```\n\nServer side usage:\n```ts\nclass TestService implements TestService {\n\tunaryCall(call: ServerUnaryCall\u003cRequest\u003e, callback: sendUnaryData\u003cResponse\u003e): void {\n\t\tcallback(null, new grpc.Response());\n\t}\n\n\tstreamResponse(call: ServerWriteableStream\u003cRequest\u003e): void {\n\t\tfor (let i = 0; i \u003c request.count; i++) {\n\t\t\tcall.write(new grpc.Response());\n\t\t}\n\t\tcall.end();\n\t}\n\n\tstreamRequest(call: ServerReadableStream\u003cRequest\u003e, callback: sendUnaryData\u003cResponse\u003e): void {\n\t\tcall\n\t\t\t.on('data', (data: Request) =\u003e {\n\t\t\t\t/* */\n\t\t\t})\n\t\t\t.on('error', (error) =\u003e {\n\t\t\t\t/* */\n\t\t\t})\n\t\t\t.on('end', () =\u003e {\n\t\t\t\tcallback(null, new grpc.Response());\n\t\t\t});\n\t}\n\n\tstreamBidi(call: ServerDuplexStream\u003cRequest, Response\u003e): void {\n\t\tcall\n\t\t\t.on('data', (data: Request) =\u003e {\n\t\t\t\tcall.write(new grpc.Response());\n\t\t\t})\n\t\t\t.on('error', (error) =\u003e {\n\t\t\t\t/* */\n\t\t\t})\n\t\t\t.on('end', () =\u003e {\n\t\t\t\tcall.end();\n\t\t\t});\n\t}\n}\n\nconst server = new Server();\n\nserver.addService(grpc.TestService.service, new TestService());\nserver.bind('0.0.0.0:3000', ServerCredentials.createInsecure());\nserver.start();\n```\n\nClient side usage:\n```ts\nimport { credentials } from 'grpc';\n// message types\nimport { Request, Response } from './gen';\n// adapter types\nimport { Client } from './gen/TestService/grpc-node';\n\nconst client = new grpc.TestService('0.0.0.0:3000', credentials.createInsecure());\n\n// unary request\nclient.unaryCall(new grpc.Request({ mode: 'normal' }), (err, response) =\u003e {\n\t/* */\n});\n\n// streaming response\nconst stream1 = client.streamResponse(new grpc.Request())\n\t.on('data', (response) =\u003e {\n\t\t/* */\n\t})\n\t.on('error', (error) =\u003e {\n\t\t/* */\n\t})\n\t.on('end', () =\u003e {\n\t\t/* */\n\t});\n\n// streaming request\nconst requestStream = client.streamRequest(cb);\nfor (let i = 0; i \u003c 10; i++) {\n\trequestStream.write(new grpc.Request({ mode: 'normal' }));\n}\nrequestStream.end();\n\nconst stream = client.streamBidi()\n\t.on('data', (response) =\u003e {\n\t\t/* */\n\t})\n\t.on('error', (error) =\u003e {\n\t\t/* */\n\t})\n\t.on('end', () =\u003e {\n\t\t/* */\n\t});\n\nfor (let i = 0; i \u003c 10; i++) {\n\tstream.write(new grpc.Request({ mode: 'normal' }));\n}\n// wait for responses, then\nstream.end();\n```\n\n\nDevelopment\n---\nGetting the sources\n```sh\n$ git clone https://github.com/anfema/grpc-code-generator.git\n# or\n$ git clone git@github.com:anfema/grpc-code-generator.git\n```\n\nInstall dependencies \u0026 build project\n```sh\n$ yarn\n#or \n$ npm\n```\n\nTasks:\n* Build once: `$ yarn/npm run build`\n* Build, watch files: `$ yarn/npm run dev`\n* Remove generated files: `$ yarn/npm run clean`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanfema%2Fgrpc-code-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanfema%2Fgrpc-code-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanfema%2Fgrpc-code-generator/lists"}