{"id":15066801,"url":"https://github.com/cocoahero/proto_plugin","last_synced_at":"2026-02-13T05:04:15.410Z","repository":{"id":255437829,"uuid":"850503064","full_name":"cocoahero/proto_plugin","owner":"cocoahero","description":"Easily build protobuf compiler plugins in Ruby.","archived":false,"fork":false,"pushed_at":"2025-02-27T03:16:20.000Z","size":74,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T22:32:28.471Z","etag":null,"topics":["gem","protobuf","protoc","ruby"],"latest_commit_sha":null,"homepage":"https://cocoahero.github.io/proto_plugin/","language":"Ruby","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/cocoahero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":"cocoahero"}},"created_at":"2024-09-01T00:40:34.000Z","updated_at":"2025-02-27T03:16:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2ee660c-01fb-40d6-aacf-690012c4633b","html_url":"https://github.com/cocoahero/proto_plugin","commit_stats":null,"previous_names":["cocoahero/proto-plugin","cocoahero/proto_plugin"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cocoahero/proto_plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocoahero%2Fproto_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocoahero%2Fproto_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocoahero%2Fproto_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocoahero%2Fproto_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cocoahero","download_url":"https://codeload.github.com/cocoahero/proto_plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocoahero%2Fproto_plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29396847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T04:26:15.637Z","status":"ssl_error","status_checked_at":"2026-02-13T04:16:29.732Z","response_time":78,"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":["gem","protobuf","protoc","ruby"],"created_at":"2024-09-25T01:12:18.611Z","updated_at":"2026-02-13T05:04:15.397Z","avatar_url":"https://github.com/cocoahero.png","language":"Ruby","funding_links":["https://github.com/sponsors/cocoahero"],"categories":[],"sub_categories":[],"readme":"# ProtoPlugin\n\n[![Lint](https://github.com/cocoahero/proto_plugin/actions/workflows/lint.yml/badge.svg)](https://github.com/cocoahero/proto_plugin/actions/workflows/lint.yml)\n[![Test](https://github.com/cocoahero/proto_plugin/actions/workflows/test.yml/badge.svg)](https://github.com/cocoahero/proto_plugin/actions/workflows/test.yml)\n[![Gem Version](https://badge.fury.io/rb/proto_plugin.svg)](https://badge.fury.io/rb/proto_plugin)\n\n## Installation\n\n```bash\ngem install proto_plugin\n```\n\n## Getting Started\n\nCreating a `protoc` plugin is as simple as creating a new executable script.\n\nThe name of the file must follow the format `protoc-gen-[plugin-name]`. As an example, the below file could be named `protoc-gen-mycoolplugin`.\n\n```ruby\n#! /usr/bin/env ruby\n\nrequire \"proto_plugin\"\n\nclass MyCoolPlugin \u003c ProtoPlugin::Base\n  def run\n    request.file_to_generate.each do |f|\n      name = File.basename(f.name, \".proto\")\n\n      add_file(name: \"#{name}.txt\", content: \u003c\u003c~TXT)\n        This file was generated from #{name}.proto!\n      TXT\n    end\n  end\nend\n\nMyCoolPlugin.run!\n```\n\n\u003e [!TIP]\n\u003e For more details on the available API, see the docs: https://cocoahero.github.io/proto_plugin\n\n### Usage\n\nTo invoke the plugin, first make sure you have `protoc` [installed](https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation). Then in a terminal, run:\n\n```bash\nprotoc --plugin=path/to/protoc-gen-mycoolplugin --mycoolplugin_out=. input.proto\n```\n\nIf the executable script is in your `$PATH`, for example installed via a gem, you can omit the `--plugin` argument.\n\n```bash\nprotoc --mycoolplugin_out=. input.proto\n```\n\nSee [`exe/protoc-gen-proto-plugin-demo`](./exe/protoc-gen-proto-plugin-demo) in this repo as another example of a plugin. Since it should be in your `$PATH` (you did install this gem right?) you can invoke it with:\n\n```bash\nprotoc --proto-plugin-demo_out=. input.proto\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/cocoahero/proto_plugin.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcocoahero%2Fproto_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcocoahero%2Fproto_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcocoahero%2Fproto_plugin/lists"}