{"id":13739954,"url":"https://github.com/grpcmd/grpcmd","last_synced_at":"2026-02-19T05:32:40.584Z","repository":{"id":206267348,"uuid":"716098738","full_name":"grpcmd/grpcmd","owner":"grpcmd","description":"A simple, easy-to-use, and developer-friendly CLI tool for gRPC.","archived":false,"fork":false,"pushed_at":"2025-01-02T16:31:03.000Z","size":109,"stargazers_count":101,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T19:31:12.654Z","etag":null,"topics":["cli","go","golang","grpc"],"latest_commit_sha":null,"homepage":"https://grpc.md","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grpcmd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-08T12:50:55.000Z","updated_at":"2025-10-04T01:10:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a94af94-8978-4b77-bf22-1d7baa7725d1","html_url":"https://github.com/grpcmd/grpcmd","commit_stats":null,"previous_names":["grpcmd/grpcmd"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/grpcmd/grpcmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpcmd%2Fgrpcmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpcmd%2Fgrpcmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpcmd%2Fgrpcmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpcmd%2Fgrpcmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grpcmd","download_url":"https://codeload.github.com/grpcmd/grpcmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpcmd%2Fgrpcmd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","go","golang","grpc"],"created_at":"2024-08-03T04:00:40.163Z","updated_at":"2026-02-19T05:32:40.564Z","avatar_url":"https://github.com/grpcmd.png","language":"Go","funding_links":[],"categories":["Tools","Go"],"sub_categories":["CLI"],"readme":"# grpcmd - The \"grpc\" command.\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/grpcmd/grpcmd)](https://goreportcard.com/report/github.com/grpcmd/grpcmd)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/grpcmd/grpcmd)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/grpcmd/grpcmd/test.yml)\n![GitHub Release](https://img.shields.io/github/v/release/grpcmd/grpcmd)\n![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads-pre/grpcmd/grpcmd/total)\n![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads-pre/grpcmd/grpcmd/latest/total)\n\ngrpcmd is a simple, easy-to-use, and developer-friendly CLI tool for gRPC.\n\n[*(If you're looking for a gRPC GUI desktop app, check out: **grpcmd-gui**)*](https://github.com/grpcmd/grpcmd-gui)\n\n## Demo\n![Demo](./demo.svg)\n\n## Feature Overview\n - View Available Services and Methods (using Reflection)\n    - `grpc :50051`\n - Describe a gRPC Method\n    - `grpc :50051 UnaryMethod`\n        - Supports short method names with error on ambiguity.\n        - Supports shell completion for the method argument.\n        - Outputs a description of the method and its request/response messages.\n - Call a gRPC Method\n    - `grpc :50051 UnaryMethod '{\"name\":\"Bob\"}'`\n        - Supports streaming both requests and responses.\n        - Outputs headers, data, and trailers.\n        - On gRPC error, `the exit code = 64 + the gRPC status code`.\n - Start a gRPC Server (Implements `grpcmd.GrpcmdService` with Reflection)\n    - `grpc server :50051`\n\n\n## Installation\n\n### Homebrew\n    brew install grpcmd/tap/grpcmd\nThe above command will install the `grpcmd` package from the tap [`grpcmd/tap`](https://github.com/grpcmd/homebrew-tap).\n\n### Binary\nYou can also download the binary files for macOS, Linux, and Windows from the [Releases](https://github.com/grpcmd/grpcmd/releases) page.\n\n## Usage\n\n### Start a gRPC Server\n\n    grpc server\n\nOutput:\n\n    Listening on address: :50051\n\n    Try running:\n            grpc :50051 UnaryMethod '{\"name\": \"Bob\"}'\n\nThis will start a gRPC server (with Reflection) implementing the [`GrpcmdService`](https://github.com/grpcmd/grpcmd/blob/main/proto/grpcmd_service.proto). The methods within this service will also attach the incoming headers as outgoing headers.\n\n#### Options\n\n##### Address\nBy default, the gRPC server listens for requests on the address `:50051`. To listen on a different address, simply pass it in as the first argument. For example:\n\n    grpc server localhost:12345\n\n### List Available Services and Methods\n    grpc :50051\n\nOutput:\n\n    grpcmd.GrpcmdService\n        BidirectionalStreamingMethod\n        ClientStreamingMethod\n        ServerStreamingMethod\n        UnaryMethod\n\n    grpc.reflection.v1.ServerReflection\n        ServerReflectionInfo\n\n    grpc.reflection.v1alpha.ServerReflection\n        ServerReflectionInfo\n\n### Describe a Method\n    grpc :50051 UnaryMethod\n\nOutput:\n\n    rpc UnaryMethod ( .GrpcmdRequest ) returns ( .GrpcmdResponse );\n\n    message GrpcmdRequest {\n      string name = 1;\n    }\n\n    message GrpcmdResponse {\n      string message = 1;\n    }\n\n    GrpcmdRequest Template:\n    {\n      \"name\": \"\"\n    }\n\n### Call a Unary Method\n    grpc :50051 UnaryMethod '{\"name\": \"Bob\"}'\n\nOutput:\n\n    content-type: application/grpc\n\n    {\n      \"message\": \"Hello, Bob!\"\n    }\n\n    status-code: 0 (OK)\n\n### Call a Client Streaming Method\n    grpc :50051 ClientStreamingMethod '{\"name\": \"Bob\"}{\"name\": \"Alice\"}'\n\nor\n\n    grpc :50051 ClientStreamingMethod '{\"name\": \"Bob\"}' '{\"name\": \"Alice\"}'\n\nOutput:\n\n    content-type: application/grpc\n\n    {\n      \"message\": \"Hello, Bob + Alice!\"\n    }\n\n    status-code: 0 (OK)\n\n### Call a Server Streaming Method\n    grpc :50051 ServerStreamingMethod '{\"name\": \"Bob\"}'\n\nOutput:\n\n    content-type: application/grpc\n\n    {\n      \"message\": \"Hello, \"\n    }\n\n    {\n      \"message\": \"B\"\n    }\n\n    {\n      \"message\": \"o\"\n    }\n\n    {\n      \"message\": \"b\"\n    }\n\n    {\n      \"message\": \"!\"\n    }\n\n    status-code: 0 (OK)\n\n### Call a Bidirectional Streaming Method\n    grpc :50051 BidirectionalStreamingMethod '{\"name\": \"Bob\"}{\"name\": \"Alice\"}'\n\nor\n\n    grpc :50051 BidirectionalStreamingMethod '{\"name\": \"Bob\"}' '{\"name\": \"Alice\"}'\n\nOutput:\n\n    content-type: application/grpc\n\n    {\n      \"message\": \"Hello, Bob!\"\n    }\n\n    {\n      \"message\": \"Hello, Alice!\"\n    }\n\n    status-code: 0 (OK)\n\n## Additional Documentation\n\n### Proto Files\nIf you want to use `.proto` files instead of Reflection, you can pass one or more comma-separated file locations to the `--protos` (shorthand: `-p`) flag. For example:\n\n    grpc --protos a.proto --protos b.proto,c.proto :50051\n\n### Proto Import Paths\nIf your `.proto` files contain import statements, you'll likely want to set the search paths for the imports to work properly. To do this, you can pass one or more comma-separated directory locations to the `--paths` (shorthand: `-P`) flag. For example:\n\n    grpc --protos a.proto --paths ../protos/ :50051\n\n### Sending an Empty Request\nTo send an empty request, simply pass an empty JSON argument for the request data. For example:\n\n    grpc :50051 UnaryMethod {}\n\n### Sending Additional Request Headers (Metadata)\nTo send a request with additional headers, simply pass one or more `key: value` arguments before the request data. For example:\n\n    grpc :50051 UnaryMethod 'custom-header: custom-value' {}\n\nor\n\n    grpc :50051 UnaryMethod header-1:value-1 header-2:value-2 {}\n\n### Exit Codes\nOn success, the exit code will be `0`. However, if there is a non-OK gRPC status code in the response, the exit code will be equal to `64 + the gRPC status code`. Other application errors will have exit codes less than `64`. For example, failure to connect to the provided address will result in an exit code of `1`.\n\n### Disambiguating Short Method Names\ngrpcmd supports taking in short methods names instead of requiring fully-qualified and namespaced method names. In the case where a short method name exists in more that one namespace or package, the tool will throw an error. For example:\n\n    grpc :50051 ServerReflectionInfo\n\nOutput:\n\n    Error while describing method ServerReflectionInfo:\n        Ambiguous method ServerReflectionInfo. Matching methods:\n                grpc.reflection.v1.ServerReflection.ServerReflectionInfo\n                grpc.reflection.v1alpha.ServerReflection.ServerReflectionInfo\n\n### Stop Firewall Popup\nYou may receive a firewall popup when running `grpc server :50051`. For example, this is the case on macOS. The reason for this is that the address `:50051` will listen to port `50051` on **all network interfaces**. To solve this, you can specify the loopback interface in the address. For example:\n - `grpc server localhost:50051`\n - `grpc server 127.0.0.1:50051`\n\nWhen connecting to the server, you can still start with `grpc :50051` if you prefer.\n\n### Setup Shell Completion\n\n#### Homebrew\nIf you installed the `grpcmd` package using Homebrew, the shell completion scripts should be installed to their respective directories. If you haven't setup brew completions, follow this [guide](https://docs.brew.sh/Shell-Completion). The guide includes directions for bash, zsh, and fish.\n\n#### Manual\nIf you want to manually enable shell completion, run the following commands based on your shell. Note: Running the following commands will only affect the current session.\n\n##### Bash\n\n    source \u003c(grpc completion bash)\n\n##### Zsh\n\n    source \u003c(grpc completion zsh)\n\n##### fish\n\n    grpc completion fish | source\n\n##### PowerShell\n\n    bash completion powershell | Out-String | Invoke-Expression\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrpcmd%2Fgrpcmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrpcmd%2Fgrpcmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrpcmd%2Fgrpcmd/lists"}