https://github.com/kunalsheth/grpc-visualizer
Visually inspect protobuf files. Developed while interning @cisco.
https://github.com/kunalsheth/grpc-visualizer
grpc
Last synced: 10 months ago
JSON representation
Visually inspect protobuf files. Developed while interning @cisco.
- Host: GitHub
- URL: https://github.com/kunalsheth/grpc-visualizer
- Owner: kunalsheth
- License: mit
- Created: 2019-07-11T16:22:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-25T16:09:18.000Z (over 6 years ago)
- Last Synced: 2025-04-09T10:25:25.547Z (12 months ago)
- Topics: grpc
- Language: Java
- Homepage:
- Size: 3.13 MB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grpc-visualizer
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
```
## Directional Graphs
Input:
```proto
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;
}
```
Command: `digraph svg`
Output:

## Cyclic Dependency Detection
### Example 1
Input:
```proto
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:

### Example 2
Input:
```proto
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`
Output:

Command: `digraph svg A`
Output:

Command: `digraph svg C`
Output:

Command: `digraph svg D`
Output:
