Tab-completion for grpcurl services and
methods, using the target server's own gRPC reflection (via grpcurl ... list).
Supports PowerShell variables and $env: values used in the command line, and
narrows package-qualified service/method names one dot-segment at a time:
$myserver = 'localhost:50051'
grpcurl -plaintext $myserver <Tab> # narrows one package segment at a time: 'co' -> 'contoso.'
grpcurl -plaintext $myserver contoso.myservice<Tab> # once a full service name matches, lists its methods
grpcurl -plaintext $myserver contoso.myservice.Say<Tab> # narrows methods in dot form (service.Method), same as
grpcurl -plaintext $myserver contoso.myservice/Say<Tab> # ... slash form (service/Method) -- grpcurl accepts both
grpcurl -H "Authorization: $env:myToken" -plaintext $myserver <Tab>Both a PowerShell and a bash version are included, with feature parity between them.
Requires PowerShell 7+ and grpcurl on PATH.
Add to your $PROFILE:
Import-Module "/path/to/grpcurl-autocomplete/grpcurl-autocomplete.psd1"pwsh ./tests/Test-GrpcurlCompletion.ps1Requires bash 4+ (associative arrays) and grpcurl on PATH.
Add to your .bashrc:
source "/path/to/grpcurl-autocomplete/grpcurl-autocomplete.bash"Bash has one variable namespace, so $VAR in the command line covers both plain
variables and exported environment variables -- there's no separate $env:VAR form
to write, unlike PowerShell.
bash tests/test-grpcurl-completion.bash