{"id":18339016,"url":"https://github.com/xoofx/grpc-curl","last_synced_at":"2025-07-12T06:33:10.913Z","repository":{"id":37030487,"uuid":"450261762","full_name":"xoofx/grpc-curl","owner":"xoofx","description":"grpc-curl is a command line tool for interacting with gRPC servers","archived":false,"fork":false,"pushed_at":"2024-03-17T14:11:15.000Z","size":143,"stargazers_count":84,"open_issues_count":8,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-14T19:47:01.663Z","etag":null,"topics":["csharp","curl","dotnet","grpc","grpc-client","protocol-buffers"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xoofx.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["xoofx"]}},"created_at":"2022-01-20T21:21:51.000Z","updated_at":"2025-02-23T11:57:44.000Z","dependencies_parsed_at":"2024-03-17T15:27:43.419Z","dependency_job_id":null,"html_url":"https://github.com/xoofx/grpc-curl","commit_stats":{"total_commits":66,"total_committers":3,"mean_commits":22.0,"dds":0.09090909090909094,"last_synced_commit":"77aba0eb9395ff8d8953d3f0b44138103e5774bc"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/xoofx/grpc-curl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2Fgrpc-curl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2Fgrpc-curl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2Fgrpc-curl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2Fgrpc-curl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xoofx","download_url":"https://codeload.github.com/xoofx/grpc-curl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2Fgrpc-curl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951607,"owners_count":23687973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","curl","dotnet","grpc","grpc-client","protocol-buffers"],"created_at":"2024-11-05T20:16:13.494Z","updated_at":"2025-07-12T06:33:10.896Z","avatar_url":"https://github.com/xoofx.png","language":"C#","funding_links":["https://github.com/sponsors/xoofx"],"categories":[],"sub_categories":[],"readme":"# grpc-curl [![Build Status](https://github.com/xoofx/grpc-curl/workflows/ci/badge.svg?branch=main)](https://github.com/xoofx/grpc-curl/actions) [![Coverage Status](https://coveralls.io/repos/github/xoofx/grpc-curl/badge.svg?branch=main)](https://coveralls.io/github/xoofx/grpc-curl?branch=main) [![NuGet](https://img.shields.io/nuget/v/grpc-curl.svg)](https://www.nuget.org/packages/grpc-curl/)\n\n\u003cimg align=\"right\" width=\"160px\" height=\"160px\" src=\"https://raw.githubusercontent.com/xoofx/grpc-curl/main/img/grpc-curl.png\"\u003e\n\n`grpc-curl` is a command line tool for interacting with gRPC servers. \n\nAll the functionalities of `grpc-curl` are also accessible through the NuGet package [DynamicGrpc](https://www.nuget.org/packages/DynamicGrpc/) that is part of this repository.\n\nThis tool is the .NET equivalent of the popular [gRPCurl](https://github.com/fullstorydev/grpcurl) written in Golang.\n\n\u003e NOTE: `grpc-curl` doesn't not support yet all the features that `gRPCurl` is providing.\n## Features\n\n- Allows to **invoke method services** for all gRPC calling modes (unary, client streaming, server streaming, full-duplex).\n- Allows to **print proto reflection descriptors** back to **proto language** (via `--describe` with `grpc-curl`, or via the API `.ToProtoString()` with `DynamicGrpc`)\n- Supports for plain Protocol Buffers naming conventions and JSON.\n- Supports for `google.protobuf.Any`: The type has to be encoded - and is decoded with the shadow property `@type` on a dictionary (e.g `@type = \"type.googleapis.com/YourTypeName\"`).\n- Build on top of the `DynamicGrpc` library available as a separate [NuGet package](https://www.nuget.org/packages/DynamicGrpc/).\n- Build for `net6.0+`\n- Available for multiple platforms. See binaries section below.\n\n## Usage\n\n`grpc-curl` currently requires that the gRPC server has activated gRPC reflection.\n\n```\nCopyright (C) 2022 Alexandre Mutel. All Rights Reserved\ngrpc-curl - Version: 1.3.6\n\nUsage: grpc-curl [options] address service/method\n\n  address: A http/https URL or a simple host:address.\n           If only host:address is used, HTTPS is used by default\n           unless the options --http is passed.\n\n## Options\n\n  -d, --data=VALUE           Data for string content.\n      --http                 Use HTTP instead of HTTPS unless the protocol is\n                               specified directly on the address.\n      --json                 Use JSON naming for input and output.\n      --describe             Describe the service or dump all services\n                               available.\n  -v, --verbosity[=VALUE]    Set verbosity.\n  -h, --help                 Show this help.\n```\n\n### Query a service\n\n```powershell\n./grpc-curl --json -d \"{\"\"getStatus\"\":{}}\" http://192.168.100.1:9200 SpaceX.API.Device.Device/Handle\n```\nWill print the following result:\n\n```json\n{\n  \"apiVersion\": 4,\n  \"dishGetStatus\": {\n    \"deviceInfo\": {\n      \"id\": \"0000000000-00000000-00000000\",\n      \"hardwareVersion\": \"rev2_proto3\",\n      \"softwareVersion\": \"992cafb5-61c7-46a3-9ef7-5907c8cf90fd.uterm.release\",\n      \"countryCode\": \"FR\",\n      \"utcOffsetS\": 1\n    },\n    \"deviceState\": {\n      \"uptimeS\": 667397\n    },\n    \"obstructionStats\": {\n      \"fractionObstructed\": 2.2786187E-06,\n      \"wedgeFractionObstructed\": [\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0\n      ],\n      \"wedgeAbsFractionObstructed\": [\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0,\n        0.0\n      ],\n      \"validS\": 667070.0,\n      \"avgProlongedObstructionIntervalS\": \"NaN\"\n    },\n    \"alerts\": {\n      \"roaming\": true\n    },\n    \"downlinkThroughputBps\": 461012.72,\n    \"uplinkThroughputBps\": 294406.6,\n    \"popPingLatencyMs\": 30.35,\n    \"boresightAzimuthDeg\": 0.7464048,\n    \"boresightElevationDeg\": 65.841354,\n    \"gpsStats\": {\n      \"gpsValid\": true,\n      \"gpsSats\": 12\n    }\n  }\n}\n```\n\n### Describe a service\n\n```powershell\n./grpc-curl --describe http://192.168.100.1:9200 SpaceX.API.Device.Device\n```\nWill print:\n\n```proto\n// SpaceX.API.Device.Device is a service:\nservice Device {\n  rpc Stream ( .SpaceX.API.Device.ToDevice ) returns ( .SpaceX.API.Device.FromDevice );\n  rpc Handle ( .SpaceX.API.Device.Request ) returns ( .SpaceX.API.Device.Response );\n}\n```\n\n### Describe all proto files serviced via reflection\n\n```powershell\n./grpc-curl --describe http://192.168.100.1:9200\n```\nWill print:\n\n```proto\n// spacex/api/common/status/status.proto is a proto file.\nsyntax = \"proto3\";\n\npackage SpaceX.API.Status;\n\n// SpaceX.API.Status.Status is a message:\nmessage Status {\n  int32 code = 1;\n  string message = 2;\n}\n\n\n// spacex/api/device/command.proto is a proto file.\nsyntax = \"proto3\";\n\npackage SpaceX.API.Device;\n\n// SpaceX.API.Device.PublicKey is a message:\nmessage PublicKey {\n  string key = 1;\n  repeated Capability capabilities = 2;\n}\n\n// ....... and more prints ........\n```\n\n## Usage API\n\nAll the functionalities of `grpc-curl` are also accessible through the NuGet package [DynamicGrpc](https://www.nuget.org/packages/DynamicGrpc/).\n\n```c#\nvar channel = GrpcChannel.ForAddress(\"http://192.168.100.1:9200\");\n// Fetch reflection data from server\nvar client = await DynamicGrpcClient.FromServerReflection(channel);\n\n// Call the method `Handle` on the service `SpaceX.API.Device.Device`\nvar result = await client.AsyncUnaryCall(\"SpaceX.API.Device.Device\", \"Handle\", new Dictionary\u003cstring, object\u003e()\n{\n    { \"get_status\", new Dictionary\u003cstring, object\u003e() }\n});\n\n// Print a proto descriptor\nFileDescriptor descriptor = client.Files[0];\nConsole.WriteLine(descriptor.ToProtoString());\n```\n## Binaries\n\n`grpc-curl` is available on multiple platforms:\n\n\n| Platform                                | Packages         |\n|-----------------------------------------|------------------|\n| `win-x64`, `win-arm`, `win-arm64`       | `zip`\n| `linux-x64`, `linux-arm`, `linux-arm64` | `deb`, `tar`\n| `rhel-x64`                              | `rpm`, `tar`\n| `osx-x64`, `osx-arm64`                  | `tar`\n\n\nIf you have dotnet 6.0 installed, you can install this tool via NuGet:\n\n```\ndotnet tool install --global grpc-curl\n```\n\nOtherwise, you can install native binaries to Windows, Linux, and macOS with the various debian/rpm/zip packages available directly from the [releases](https://github.com/xoofx/grpc-curl/releases).\n\ngrpc-curl is also available via homebrew for macOS and Linux:\n\n```\n$ brew tap xoofx/grpc-curl\n$ brew install grpc-curl\n```\n\n## License\n\nThis software is released under the [BSD-Clause 2 license](https://opensource.org/licenses/BSD-2-Clause). \n\n## Author\n\nAlexandre Mutel aka [xoofx](https://xoofx.github.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoofx%2Fgrpc-curl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxoofx%2Fgrpc-curl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoofx%2Fgrpc-curl/lists"}