Skip to content

Command line tool

Philip Vieira edited this page Dec 19, 2018 · 3 revisions

The command line tool is used to both manage your central protobuf repository and to automate code generation in service and consumer projects.

Installing

The easiest way of obtaining the protogen command line tool for any platform is by installing it through Go package installer. Run the command and immediately have access to the tool.

$ go get -u github.com/zeeraw/protogen

Commands

generate

This command will execute the generation sequence.

$ protogen generate

init

This command will help you generate the .protogen file in your current repository.

$ protogen init
# Source repository: github.com/zeeraw/protogen-protos
# Language to generate for in this project: go

info

Returns information on protoc dependencies and names of the project contributors.

$ protogen info
# Dependencies
# protoc        ✓ (3.6.1)
# protoc-gen-go ✓
#
# Authors
# Philip V. (Zee) zee@vall.in

version

Returns the version and/or the build reference of your protogen binary.

$ protogen version
# 0.0.1