{"id":13643872,"url":"https://github.com/seamia/protodot","last_synced_at":"2025-04-05T09:07:27.659Z","repository":{"id":38616958,"uuid":"149486196","full_name":"seamia/protodot","owner":"seamia","description":"transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)","archived":false,"fork":false,"pushed_at":"2023-12-21T20:52:56.000Z","size":49489,"stargazers_count":435,"open_issues_count":6,"forks_count":41,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-29T08:06:42.642Z","etag":null,"topics":["cli","dependency-graph","dot","go","golang","graph","graphviz","graphviz-dot-language","grpc","png","portable-network-graphics","proto3","protobuf","protoc","protocol-buffers","scalable-vector-graphics","svg","visualization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seamia.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":"support.go","governance":null,"roadmap":null,"authors":null}},"created_at":"2018-09-19T17:17:26.000Z","updated_at":"2025-03-09T18:59:35.000Z","dependencies_parsed_at":"2024-01-07T18:07:04.531Z","dependency_job_id":null,"html_url":"https://github.com/seamia/protodot","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamia%2Fprotodot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamia%2Fprotodot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamia%2Fprotodot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamia%2Fprotodot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seamia","download_url":"https://codeload.github.com/seamia/protodot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312078,"owners_count":20918344,"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","dependency-graph","dot","go","golang","graph","graphviz","graphviz-dot-language","grpc","png","portable-network-graphics","proto3","protobuf","protoc","protocol-buffers","scalable-vector-graphics","svg","visualization"],"created_at":"2024-08-02T01:01:54.105Z","updated_at":"2025-04-05T09:07:27.623Z","avatar_url":"https://github.com/seamia.png","language":"Go","funding_links":[],"categories":["Tools","Go","golang"],"sub_categories":["CLI"],"readme":"# protodot\ntransforming your `.proto` files into `.dot` files (and `.svg`, `.png` if you happen to have `graphviz` installed)\n\n## online demo\nyou can find an online demo of this tool [here](https://protodot.seamia.net)\n\n## data pipeline\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/pipeline.svg\"\u003e\u003c/p\u003e\n\n\n## installation\nyou can download the sources (from this page) and build `protodot` yourself, or\nyou can download pre-built binaries for a few selected environments (or from [here](https://github.com/seamia/protodot/tree/master/binaries)):\n\n   * Darwin ([x86](https://protodot.seamia.net/binaries/darwin), [arm](https://protodot.seamia.net/binaries/darwin.arm))\n   * [Linux](https://protodot.seamia.net/binaries/linux)\n   * [Wasm](https://protodot.seamia.net/binaries/wasm)\n   * [Windows](https://protodot.seamia.net/binaries/windows)\n\n`protodot` output is highly customizable through its configuration file and a set of templates files.\nif you installed `protodot` from the binary distribution - you may want to extract aforementioned files by running:\n\n```\n   ./protodot -install\n```\n\n## command line arguments\n\n   * `-src what.proto` - location and name of the source file, required\n   * `-config config.json` - location and name of the configuration file, optional\n   * `-select .one.two;three.four` - name(s) of the selected elements to show, optional, explained later in this document\n   * `-output save-it-here` - name of the output file, optional\n   * `-inc /abc/def;/xyz` - (semicolon separated) list of the include directories, optional\n\n\n## configuration file\ntbd\n\n## selected output\nsometimes the resulting diagram can be overwhelming.\nyou have an option to limit the output to the elements that interest you the most, hence `-select args` command line option.\nso far, `args` in `-select args` can take one of the three available forms:\n   * list of the elements (and their dependencies) that you want to see included (separated by `;`). the elements can be `enums`, `messages`, `rpc` methods and `services`.\n   * if you specify `*` as an argument - this will result in the inclusion of the elements declared in the **main** `.proto` file (specified in `-src` argument) and their dependencies. in other words: all the **unused** elements declared in all the **included** `.proto` files will not be shown.\n   * if you specify `imports` as an argument - `protodot` will generate import dependency graph (see an example below)\n\n\n## an example of output\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/one.dot.svg\"\u003e\u003c/p\u003e\n\n\n\n\n## an illustration of effects of different `-select` options\nusing `https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2/dlp.proto` as the source\n\n### not using `-select`\neverything declared in the root `.proto` file and all the `imports` will be produced:\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/dlp_full.svg\"\u003e\u003c/p\u003e\n\n### using `-select *`\nonly elements declared in the root `.proto` file and their dependencies will be produced:\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/dlp_star.svg\"\u003e\u003c/p\u003e\n\n### using `-select imports`\nonly `imports` dependency graph will be produced:\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/dlp_imports.svg\"\u003e\u003c/p\u003e\n\n### using `-select .ListDlpJobs`\nin this particular case, the name of the `rpc` method was specified: this will result in production of the requested `rpc` method, it's encompasing `service` element and all the dependencied of the method:\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/dlp_rpc.svg\"\u003e\u003c/p\u003e\n\n### using `-select .AnalyzeDataSourceRiskDetails`\nsame as above, but instead of `rpc` method, name of the `message` was specified:\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/dlp_message.svg\"\u003e\u003c/p\u003e\n\n\n## how to (automatically) generate `.svg` and/or `.png` images from produced `.dot` file\n1. install `graphviz` (see https://graphviz.gitlab.io/download/ for the instructions)\n2. specify the location of the `dot` utility (which is a part of `graphviz)` in your version of configuration file, e.g.\n```\n{\n\t\"locations\": {\n\t\t\"graphviz\":\t\"/path/to/dot\",\n```\n3. set approptiate `options` in your version of configuration file, e.g.\n```\n{\n\t\"options\" : {\n\t\t\"generate .png file\":\t\tfalse,\n\t\t\"generate .svg file\":\t\ttrue,\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamia%2Fprotodot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseamia%2Fprotodot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamia%2Fprotodot/lists"}