{"id":37135489,"url":"https://github.com/apoprotsky/protoc-gen-tpl","last_synced_at":"2026-01-14T15:47:58.029Z","repository":{"id":57705156,"uuid":"365850389","full_name":"apoprotsky/protoc-gen-tpl","owner":"apoprotsky","description":"proto-gen-tpl is a protoc plugin for generating files using custom templates","archived":false,"fork":false,"pushed_at":"2022-06-22T22:36:22.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-21T18:56:26.153Z","etag":null,"topics":["go","golang","php","protobuf","protobuf-plugin","protocol-buffers","typescript"],"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/apoprotsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-05-09T21:20:43.000Z","updated_at":"2021-11-08T22:05:26.000Z","dependencies_parsed_at":"2022-08-24T10:40:44.823Z","dependency_job_id":null,"html_url":"https://github.com/apoprotsky/protoc-gen-tpl","commit_stats":null,"previous_names":["apoprotsky/prototpl","apoprotsky/proto-gen-tpl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apoprotsky/protoc-gen-tpl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoprotsky%2Fprotoc-gen-tpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoprotsky%2Fprotoc-gen-tpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoprotsky%2Fprotoc-gen-tpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoprotsky%2Fprotoc-gen-tpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apoprotsky","download_url":"https://codeload.github.com/apoprotsky/protoc-gen-tpl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoprotsky%2Fprotoc-gen-tpl/sbom","scorecard":{"id":203125,"data":{"date":"2025-08-11","repo":{"name":"github.com/apoprotsky/protoc-gen-tpl","commit":"f8e3175495775de07f1e361a7ca3cda06fb4048f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"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-16T23:09:54.593Z","repository_id":57705156,"created_at":"2025-08-16T23:09:54.593Z","updated_at":"2025-08-16T23:09:54.593Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","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":["go","golang","php","protobuf","protobuf-plugin","protocol-buffers","typescript"],"created_at":"2026-01-14T15:47:57.274Z","updated_at":"2026-01-14T15:47:58.019Z","avatar_url":"https://github.com/apoprotsky.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protoc-gen-tpl\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/apoprotsky/protoc-gen-tpl)](https://goreportcard.com/report/github.com/apoprotsky/protoc-gen-tpl)\n\n## Overview\n\n`protoc-gen-tpl` is a plugin for protobuf compiler (`protoc`) which allows to generate files using custom templates and rules.\n\nSee in [checklist](#checklist) implemented and planned features.\n\n## Prerequisites\n\nYou need protobuf compiler. See instructions on [Protocol Buffers site](https://developers.google.com/protocol-buffers).\n\nInstall on `Linux` using `apt`\n```sh\napt install protobuf-compiler\n```\n\nInstall on `macOS` using [Homebrew](https://brew.sh)\n```sh\nbrew install protobuf\n```\n\n## Installation\n\nInstall `protoc-gen-tpl` plugin using [go](https://golang.org)\n```\ngo get github.com/apoprotsky/protoc-gen-tpl\n```\n\n## How to use\n\nExample how to generate go code from proto files\n```sh\nmkdir examples/out\nprotoc \\\n  --tpl_out=examples/out \\\n  --tpl_opt=prefix=github.com/apoprotsky/protoc-gen-tpl/examples/ \\\n  --tpl_opt=lang=go \\\n  --tpl_opt=lang=ts \\\n  --tpl_opt=lang=php \\\n  examples/proto/*.proto\n```\nOption `prefix` has [same behaviour](https://developers.google.com/protocol-buffers/docs/reference/go-generated#invocation) as `module=$PREFIX` for go plugin.\n\nOption `lang` designates which languages to use for output files. This option can be specified multiple times.\n\n## Checklist\n\n### Go\n\n- [x] Generate `go` files from `proto` files\n- [x] Generate structs types from messages\n- [x] Generate struct fields tags\n  - [x] Generate json tags\n  - [x] Generate custom tags\n- [ ] Generate types from enumerations\n- [ ] Generate constants from enumerations\n- [ ] Supported struct fields types:\n  - [x] Scalar types (string, numbers)\n  - [x] Arrays\n  - [x] Message type\n  - [ ] Enumeration type\n\n### Typescript\n\n- [x] Generate `ts` files from `proto` files\n- [x] Generate interfaces from messages\n- [ ] Generate enumerations\n- [ ] Supported interface fields types:\n  - [x] Scalar types (string, boolean, number, bigint)\n  - [x] Arrays\n  - [x] Message type\n  - [ ] Enumeration type\n\n### PHP\n\n- [x] Generate `php` files from `proto` files\n- [x] Generate classes from messages\n- [ ] Generate constants from enumerations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapoprotsky%2Fprotoc-gen-tpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapoprotsky%2Fprotoc-gen-tpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapoprotsky%2Fprotoc-gen-tpl/lists"}