Protobuf schema writer
Generate a typed Protobuf schema from a Meridian payload definition and write it to disk. Used when shipping structured telemetry or license envelopes to native components.
Prerequisites
- Meridian CLI v2.4+ installed and authenticated
- A
payload.jsondefinition in the working directory - Write access to the target output path
Steps
- Define the payload shape
Create
payload.jsonwith field names, types, and wire numbers. Supported types: string, bytes, uint32, uint64, bool, enum, repeated, and nested messages. - Run the schema generator
meridian proto write --in payload.json --out schema.proto
- Verify the output
Open
schema.protoand confirm all message definitions, field numbers, and type mappings are correct. - Compile for your target language
protoc --cpp_out=./gen schema.proto
Flags
| Flag | Default | Description |
|---|---|---|
| --in | payload.json | Path to the payload definition file |
| --out | schema.proto | Destination path for the generated .proto |
| --package | meridian | Protobuf package name |