Protogen is a Node.js application that generates .proto
files based on the descriptors provided by a gRPC reflection service. The generated .proto
files can be exported as a .tar.gz
archive for easy transport.
- Interactively query a gRPC reflection service to generate
.proto
files. - Handles methods that are not implemented and reports missing methods.
- Exports generated
.proto
files into a.tar.gz
archive.
- Node.js (v14.x or later)
- Yarn package manager
- Clone the repository:
git clone https://github.com/yourusername/protogen.git
cd protogen
- Install the dependencies:
yarn install
- Run the script:
node generateProtos.js
- Follow the prompts:
- Enter the gRPC endpoint.
- Select the connection type (plaintext or TLS).
- Choose whether to generate a
.tar.gz
file for the.proto
files.
? Enter the gRPC endpoint: sei.grpc.kjnodes.com:443
? Select connection type: TLS
? Do you want to generate a .tar.gz file for the .proto files? (Y/n) Y
- The generated
.proto
files will be saved in thegenerated_protos
directory. - If opted, a
.tar.gz
archive of thegenerated_protos
directory will be created asgenerated_protos.tar.gz
.
The script will handle methods that are not implemented by the reflection service and will report them at the end of the execution.
Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.