{"id":20333263,"url":"https://github.com/protocolbuffers/txtpbfmt","last_synced_at":"2025-05-14T21:04:45.204Z","repository":{"id":38250136,"uuid":"195210029","full_name":"protocolbuffers/txtpbfmt","owner":"protocolbuffers","description":"txtpbfmt parses, edits and formats text proto files in a way that preserves comments.","archived":false,"fork":false,"pushed_at":"2025-03-26T14:44:41.000Z","size":494,"stargazers_count":110,"open_issues_count":15,"forks_count":19,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-13T17:46:56.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protocolbuffers.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,"zenodo":null}},"created_at":"2019-07-04T09:20:03.000Z","updated_at":"2025-04-13T16:30:36.000Z","dependencies_parsed_at":"2023-10-11T23:56:49.500Z","dependency_job_id":"d352a96e-04bd-4c5e-a4e1-0a73a87b0ab8","html_url":"https://github.com/protocolbuffers/txtpbfmt","commit_stats":{"total_commits":96,"total_committers":8,"mean_commits":12.0,"dds":"0.42708333333333337","last_synced_commit":"20d2c9ebc01daa87ca2b7b697a757613012b104d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protocolbuffers%2Ftxtpbfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protocolbuffers%2Ftxtpbfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protocolbuffers%2Ftxtpbfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protocolbuffers%2Ftxtpbfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protocolbuffers","download_url":"https://codeload.github.com/protocolbuffers/txtpbfmt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227605,"owners_count":22035668,"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":[],"created_at":"2024-11-14T20:30:03.257Z","updated_at":"2025-05-14T21:04:45.145Z","avatar_url":"https://github.com/protocolbuffers.png","language":"Go","readme":"# Text Proto Formatter\n\n`txtpbfmt` parses, edits and formats text proto files in a way that preserves\ncomments.\n\nThis saves development (read/edit/review) time and enables automated edits.\n\n## How to format existing text proto files?\n\nInstall:\n\n```shell\n$ go install github.com/protocolbuffers/txtpbfmt/cmd/txtpbfmt@latest\n```\n\nFormat files in-place:\n\n```shell\n$ ${GOPATH}/bin/txtpbfmt [FILES]\n```\n\nWrite formatted input to stdout:\n\n```shell\n$ ${GOPATH}/bin/txtpbfmt \u003c [FILE]\n```\n\n## What does it do?\n\nMain features:\n\n![main features](docs/features.png)\n\nConfigurable features:\n\n-   Fields on\n    [`parser.Config`](https://github.com/search?q=repo%3Aprotocolbuffers%2Ftxtpbfmt+%22type+Config+struct%22\u0026type=code)\n-   Corresponding `# txtpbfmt: feature` names on\n    [`parser.addToConfig`](https://github.com/search?q=repo%3Aprotocolbuffers%2Ftxtpbfmt+%22func+addToConfig%28%22\u0026type=code)\n-   Examples on [config.md](docs/config.md)\n\n## Is there an API to edit text proto files while preserving comments?\n\nYes, see [ast.go](ast/ast.go).\n\n## How to disable it?\n\nYou can disable formatting for a whole file by adding a comment with \"#\ntxtpbfmt: disable\" to the top of the file (before the first non-empty\nnon-comment line), eg:\n\n```textproto\n# File overview ...\n\n# txtpbfmt: disable\n\ncontent: { ... }\n```\n\n## Which file extension should I use for my text proto files?\n\nThe `.textproto` extension is the most used extension inside Google (the second\nmost popular choice is `.textpb`).\n\n## Which tools support it? How to format on save?\n\nCurrently there is no open source integration with any editor.\n\n## See also\n\n* [Text Format Language Specification](https://developers.google.com/protocol-buffers/docs/text-format-spec)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotocolbuffers%2Ftxtpbfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotocolbuffers%2Ftxtpbfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotocolbuffers%2Ftxtpbfmt/lists"}