{"id":15323689,"url":"https://github.com/mvrilo/protog","last_synced_at":"2025-09-04T00:10:34.386Z","repository":{"id":137029187,"uuid":"266523651","full_name":"mvrilo/protog","owner":"mvrilo","description":"Protobuf file generator for the command line","archived":false,"fork":false,"pushed_at":"2020-08-12T21:31:33.000Z","size":24,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T19:02:14.920Z","etag":null,"topics":["cli","command-line","generator","go","golang","proto","protobuf","protoc"],"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/mvrilo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-05-24T11:08:21.000Z","updated_at":"2021-04-24T12:00:07.000Z","dependencies_parsed_at":"2023-03-13T10:58:37.982Z","dependency_job_id":null,"html_url":"https://github.com/mvrilo/protog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvrilo%2Fprotog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvrilo%2Fprotog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvrilo%2Fprotog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvrilo%2Fprotog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvrilo","download_url":"https://codeload.github.com/mvrilo/protog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248980252,"owners_count":21193131,"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","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":["cli","command-line","generator","go","golang","proto","protobuf","protoc"],"created_at":"2024-10-01T09:21:03.837Z","updated_at":"2025-04-14T23:34:24.331Z","avatar_url":"https://github.com/mvrilo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protog\n\n[![GoDoc](https://godoc.org/github.com/mvrilo/protog?status.svg)](https://godoc.org/github.com/mvrilo/protog) \n[![Go Report Card](https://goreportcard.com/badge/github.com/mvrilo/protog)](https://goreportcard.com/report/github.com/mvrilo/protog) \n\nProtobuf file generator for the command line.\n\n## Installation\n\n```\ngo get github.com/mvrilo/protog/cmd/protog\n```\n\n## Usage\n\n```\n$ protog -h\nprotog is a protobuf file generator for the command line\n\nUsage:\n  protog \u003cname\u003e [-dhfomnsp] [-n option_name:proto_name] [-m MessageName[field:type,field:type,...]] [-s ServiceName[MethodName:In:Out]]\n\nExamples:\nprotog Greet.v1 -m HelloRequest[data:string]\n\nFlags:\n  -d, --dryrun                prints the generated proto to stdout\n  -f, --force                 overwrite the file if it already exists\n  -h, --help                  help for protog\n  -m, --message stringArray   add a message and its fields\n  -n, --option strings        add an option\n  -o, --output string         output dir for the generated proto (default \".\")\n  -p, --package string        package name\n  -s, --service stringArray   add a service and its methods\n  -v, --version               version for protog\n```\n\n## Example Usage\n\nGiven the input:\n\n```\nprotog Greet.v1 \\\n    -n go_package:greet \\\n    -m HelloRequest[data:string] \\\n    -m HelloResponse[id:int64,data:string] \\\n    -s HelloService[SendHello:HelloRequest:HelloResponse,CheckHello] \\\n    -s PingService[SendPing:PingRequest:+PingResponse]\n```\n\nYou should get the file `greet.v1.proto` with the content:\n\n```\nsyntax = \"proto3\";\n\npackage Greet.v1;\n\noption \"go_package\" = \"greet\";\n\nimport \"google/protobuf/empty.proto\";\n\nmessage HelloRequest {\n\tstring data = 1;\n}\n\nmessage HelloResponse {\n\tstring data = 1;\n\tint64 id = 2;\n}\n\nservice HelloService {\n\trpc SendHello (HelloRequest) returns (HelloResponse) {};\n\trpc CheckHello (google.protobuf.Empty) returns (google.protobuf.Empty) {};\n}\n\nservice PingService {\n\trpc SendPing (PingRequest) returns (stream PingResponse) {};\n}\n```\n\n## Author\n\nMurilo Santana \u003c\u003cmvrilo@gmail.com\u003e\u003e\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvrilo%2Fprotog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvrilo%2Fprotog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvrilo%2Fprotog/lists"}