CLI to visually inspect gRPC's .proto
config files.
(
>>>
indicates a streaming RPC call, ──>
indicates a singular value.)
grpc-visualizer path/to/grpc-config.proto ["command 1" "command 2"...]
commands:
'help'
'message [REGEX]' — display structure of message data
'digraph (svg|pdf|png|dot) [REGEX]' — display structure of message types in relation to each other
'service [REGEX]' — display client/server RPC functions
'gui' — open web server on port 8383 for interactive digraphs
Input:
message RecursiveType {
// ...
My code = 4;
}
message My {
RecursiveType should = 1;
// ...
RecursiveType crash = 3;
My code = 4;
}
message Person {
// ...
message PhoneNumber { /* ... */ }
repeated PhoneNumber phones = 4;
}
message AddressBook {
repeated Person people = 1;
}
Input:
message A {
B aHasB = 1;
C aAlsoHasC = 2;
}
message B {
D bHasD = 1;
}
message C {
D cHasD = 1;
}
message D {
A dMischievouslyHasA = 1;
}
Command: digraph svg A
Output:
Input:
message A {
B aHasB = 1;
}
message B {
C bHasC = 1;
D andD = 2;
E andE = 3;
}
message C {
D cAlsoHasD = 1;
}
message D {
A dMischievouslyHasA = 1;
}
message E {
}
Command: digraph svg A
Output: