grpc-curl 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global grpc-curl --version 1.0.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 grpc-curl --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=grpc-curl&version=1.0.0
nuke :add-package grpc-curl --version 1.0.0

grpc-curl Build Status Coverage Status NuGet

<img align="right" width="160px" height="160px" src="https://raw.githubusercontent.com/xoofx/grpc-curl/master/img/grpc-curl.png">

grpc-curl is a command line tool for interacting with gRPC servers. This tool is the .NET equivalent of the popular gRPCurl written in Golang.

NOTE: grpc-curl doesn't not support yet all the features that gRPCurl is providing.

Usage

./grpc-curl --json -d "{""getStatus"":{}}" 192.168.100.1:9200 SpaceX.API.Device.Device/Handle

Will print the following result:

{
  "apiVersion": 4,
  "dishGetStatus": {
    "deviceInfo": {
      "id": "0000000000-00000000-00000000",
      "hardwareVersion": "rev2_proto3",
      "softwareVersion": "992cafb5-61c7-46a3-9ef7-5907c8cf90fd.uterm.release",
      "countryCode": "FR",
      "utcOffsetS": 1
    },
    "deviceState": {
      "uptimeS": 667397
    },
    "obstructionStats": {
      "fractionObstructed": 2.2786187E-06,
      "wedgeFractionObstructed": [
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0
      ],
      "wedgeAbsFractionObstructed": [
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0
      ],
      "validS": 667070.0,
      "avgProlongedObstructionIntervalS": "NaN"
    },
    "alerts": {
      "roaming": true
    },
    "downlinkThroughputBps": 461012.72,
    "uplinkThroughputBps": 294406.6,
    "popPingLatencyMs": 30.35,
    "boresightAzimuthDeg": 0.7464048,
    "boresightElevationDeg": 65.841354,
    "gpsStats": {
      "gpsValid": true,
      "gpsSats": 12
    }
  }
}

Usage API

The functionality of grpc-curl is also accessible through the NuGet package DynamicGrpc.

var channel = GrpcChannel.ForAddress("http://192.168.100.1:9200");
// Fetch reflection data from server
var client = await DynamicGrpcClient.FromServerReflection(channel);

// Call the method `Handle` on the service `SpaceX.API.Device.Device`
var result = await client.AsyncUnaryCall("SpaceX.API.Device.Device", "Handle", new Dictionary<string, object>()
{
    { "get_status", new Dictionary<string, object>() }
});

Features

  • Build on top of the DynamicGrpc library available as a separate NuGet package.
  • DynamicGrpc supports all the kind of gRPC calls (unary blocking, unary async, streaming, full-duplex...)
  • grpc-curl supports only blocking/async method for now (streaming should follow)
  • Support for plain Protocol Buffers naming conventions or JSON.

Binaries

If you have dotnet 6.0 installed, you can install this tool via NuGet:

dotnet tool install --global grpc-curl --version 1.0.0

Debian and macOS packages for x64/am64 will be released later.

License

This software is released under the BSD-Clause 2 license.

Author

Alexandre Mutel aka xoofx.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.4.0 530 11/13/2022
1.3.7 431 6/15/2022
1.3.6 442 3/7/2022
1.3.5 436 2/1/2022
1.3.4 416 1/30/2022
1.3.3 409 1/30/2022
1.3.2 429 1/29/2022
1.3.1 391 1/27/2022
1.3.0 483 1/22/2022
1.2.0 483 1/21/2022
1.1.0 488 1/21/2022
1.0.0 536 1/20/2022