dotnet-grpc-cli 0.5.0

dotnet tool install --global dotnet-grpc-cli --version 0.5.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dotnet-grpc-cli --version 0.5.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-grpc-cli&version=0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package dotnet-grpc-cli --version 0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

dotnet-grpc-cli

A .NET Global Tool equivalent of grpc_cli. Inspired by grpc_cli

Install

dotnet tool install -g dotnet-grpc-cli

List services

dotnet grpc-cli ls <address>

Example:

dotnet grpc-cli ls http://localhost:10042
Shared_CS.Calculator
MegaCorp.TimeService

List methods in service

dotnet grpc-cli ls <address> <service>

Example:

dotnet grpc-cli ls http://localhost:10042 MegaCorp.TimeService
filename: MegaCorp.TimeService.proto
package: MegaCorp
service TimeService {
  rpc Subscribe(ProtoBuf.Grpc.Internal.Empty) returns (stream MegaCorp.TimeResult) {}
}

Dump service in proto format

dotnet grpc-cli dump <address> <service>

Example:

dotnet grpc-cli dump http://localhost:10042 MegaCorp.TimeService
---
File: ProtoBuf.Grpc.Internal.Empty.proto
---
syntax = "proto3";
package ProtoBuf.Grpc.Internal;

message Empty {
}

---
File: MegaCorp.TimeResult.proto
---
syntax = "proto3";
import "google/protobuf/timestamp.proto";
package MegaCorp;

message TimeResult {
  Timestamp Time = 1;
}

---
File: MegaCorp.TimeService.proto
---
syntax = "proto3";
import "ProtoBuf.Grpc.Internal.Empty.proto";
import "MegaCorp.TimeResult.proto";
package MegaCorp;

service TimeService {
   rpc Subscribe(Empty) returns (stream TimeResult);
}

Write proto to disk

dotnet grpc-cli dump <address> <service> -o <directory>

Example:

dotnet grpc-cli dump http://localhost:10042 MegaCorp.TimeService -o ./protos

This package has no dependencies.

Version Downloads Last updated
0.5.0 1,038 5/11/2021
0.4.0 889 1/24/2021
0.3.0 108 1/20/2021
0.2.0 444 7/5/2020
0.1.0 292 7/4/2020