A command-line tool that uses gRPC reflection to help developers interact with gRPC services.
- Connect to any gRPC server with reflection enabled
- List all available methods on a gRPC service
- Generate JSON example request bodies for any gRPC method
- Support for nested message types and complex structures
- Secure and insecure connection options
# Install with go install
go install github.com/horstf/goshape@latest
# Or build from source
git clone https://github.com/horstf/goshape.git
cd goshape
make buildgoshape --host localhost --port 50051 --list-methodsgoshape --host localhost --port 50051 --method MusicService.GetAlbumExample output:
{
"id": "00000000-0000-0000-0000-000000000000"
}# Use an insecure connection (default)
goshape --host localhost --port 50051 --method MusicService.GetAlbum --insecure
# Set a custom timeout (in seconds)
goshape --host localhost --port 50051 --method MusicService.GetAlbum --timeout 5
# Use secure connection with TLS
goshape --host localhost --port 50051 --method MusicService.GetAlbum --insecure=false --ca-cert=ca.pem- Go 1.24 or higher
- Protocol Buffers compiler (protoc)
- Go plugins for Protocol Buffers
- Clone the repository
- Install dependencies:
go mod download - Generate protobuf code:
make proto - Build the tool:
make build
Run the included test server:
make run-test-serverIn another terminal, test the tool against the server:
./goshape --host localhost --port 50051 --list-methods
./goshape --host localhost --port 50051 --method MusicService.GetAlbumRun the test suite:
# Run unit tests
make test
# Run integration tests (requires the test server)
go test -tags=integration ./...
# Run all tests with coverage report
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.outMIT