https://github.com/imnerocode/protoc-generator
PowerShell script to automate the generation of Protobuf and gRPC files for multiple languages using Docker. Simplifies workflows and ensures consistency across environments.
https://github.com/imnerocode/protoc-generator
automation docker grpc powershell protobuf
Last synced: about 2 months ago
JSON representation
PowerShell script to automate the generation of Protobuf and gRPC files for multiple languages using Docker. Simplifies workflows and ensures consistency across environments.
- Host: GitHub
- URL: https://github.com/imnerocode/protoc-generator
- Owner: imnerocode
- Created: 2024-12-19T23:10:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-20T15:04:03.000Z (over 1 year ago)
- Last Synced: 2025-04-07T13:13:46.807Z (12 months ago)
- Topics: automation, docker, grpc, powershell, protobuf
- Language: PowerShell
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Protobuf Generator Script
This repository contains a PowerShell script designed to automate the generation of Protobuf files for multiple programming languages using Docker.
## Features
- Currently supports generating gRPC and Protobuf code for the following languages:
- Go (Golang)
- Ruby
- Java
- C# (Csharp)
- Utilizes the `namely/protoc-all` Docker image for consistency across environments.
- Automatically detects `.proto` files and organizes the generated code.
## Prerequisites
- Docker installed and running.
- PowerShell available on your system.
## Usage
1. Clone this repository:
```bash
git clone github.com/imnerocode/protoc-generator
```
2. Place your `.proto` files inside a `proto/` directory at the root level.
3. Run the script:
```powershell
.\generate_proto.ps1
```
4. Follow the on-screen prompts to select the desired language for code generation.
## Notes
- Supported languages currently require specific package options in the `.proto` files:
- **Go**: `option go_package`
- **Ruby**: `option ruby_package`
- **Java**: `option java_package`
- **C#**: `option csharp_namespace`
- Generated files will be stored in the `proto/generated/` directory.
- Ensure your `.proto` files are properly defined and include all necessary imports.
## Planned Features
- Expand support to Python, C++, PHP, Node.js, and TypeScript in future updates.
- Improve validation for `.proto` files and package configurations.
## Contributing
Feel free to open issues or submit pull requests to improve the script. Contributions to support additional languages are especially welcome!