grpcurl invokes gRPC RPCs from the shell using JSON requests instead of binary protobuf on the wire. It lists and describes services when reflection or schema files are available.
Overview
grpcurl is a terminal program for talking to gRPC servers in the same spirit as HTTP curl tools. gRPC normally encodes messages in protocol buffers on the wire, which standard curl cannot handle well without HTTP/2 support; grpcurl accepts JSON bodies that it encodes using the service schema before sending calls.
Its main job is invoking RPC methods from the command line, including streaming and bi-directional streaming when run from an interactive terminal with stdin as the body. It works with TLS and plain-text servers, exposes many TLS tuning options, and supports mutual TLS when the server requires a client certificate.
When a server exposes gRPC reflection, grpcurl can discover services without local files. Otherwise you supply .proto sources with import paths or compiled protoset descriptor files. List and describe verbs expose services, methods, and type definitions as proto-like snippets.
Distribution includes release binaries, Homebrew on macOS, Docker images, Snap, and third-party packages on Windows and Linux. A Go library in the same project helps authors build other CLI tools that dynamically call gRPC endpoints.
Key features
- JSON-encoded gRPC invocations
- Server reflection support
- Proto and protoset schema input
- Streaming RPC support
- TLS and mutual TLS options
- List and describe services
- Request headers and metadata
- Stdin request bodies with -d @
Use cases
- Manual gRPC API debugging
- Scripted RPC smoke tests
- Exploring unknown gRPC schemas
- Pipelines with jq-generated JSON bodies