To run the code generation, from the repo root issue:
go install ./cmd/client-generator; client-generator .
The general flow is that protos get turned to an openapi json and this generator takes the JSON and creates go and typescript clients.
Most of the templating is done with go text templates, but the harder parts like recursive type definitions are done by functions.
Go and JS are similar enough to share most of the code but PHP proved to be a harder case (see unfinished https://github.com/m3o/m3o/pull/71)