Quickstart
Create a protobuf module and generate code with EasyP v1 nightly.
Install an explicit v1 nightly and make sure Git is available. The go plugin uses protoc-gen-go from PATH when installed, otherwise EasyP uses its bundled WASM generator.
1. Initialize a module
# Use the nightly installed in the installation guide for this terminal session.
export PATH="$HOME/.local/share/easyp-nightly/bin:$PATH"
easyp --version
mkdir contracts && cd contracts
git init
easyp init --module github.com/acme/contractsinit creates three files: protobuf.mod for the module, easyp.yaml for lint and breaking policies, and easyp.gen.yaml for generation. If a file already exists, EasyP asks before replacing it. Automatic migration from Buf dependencies is not part of the pilot.
2. Add a proto file
mkdir -p proto/acme/v1Create proto/acme/v1/hello.proto:
syntax = "proto3";
package acme.v1;
option go_package = "github.com/acme/contracts/gen/go/acme/v1;acmev1";
message Hello {
string name = 1;
}Set the module's source root in protobuf.mod:
module github.com/acme/contracts
roots proto3. Configure generation
Replace the empty plugin list in easyp.gen.yaml:
version: v1
generate:
modules: [github.com/acme/contracts]
plugins:
- name: go
out: ./gen/go
opts:
paths: source_relative4. Run the commands
easyp mod tidy
easyp generate
easyp lint --path protomod tidy creates protobuf.lock. Add require module version lines to protobuf.mod before running it when your sources import another Git module. mod download later fetches the exact locked commits. Commit protobuf.mod and protobuf.lock alongside the source files.
For a full field reference, see configuration, generation, and dependencies.