[doc] Add note on current status of grpc_cli tool (#35675)

Closes #35675

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35675 from yashykt:UpdateGrpcCliDoc a62de2821d
PiperOrigin-RevId: 603095922
pull/35761/head
Yash Tibrewal 1 year ago committed by Copybara-Service
parent 282cd969c9
commit c26bb28626
  1. 36
      doc/command_line_tool.md

@ -2,11 +2,16 @@
## Overview ## Overview
This document describes the command line tool that comes with gRPC repository. It is desirable to have command line This document describes the command line tool that comes with gRPC repository.
tools written in other languages roughly follow the same syntax and flags. It is desirable to have command line tools written in other languages roughly
follow the same syntax and flags.
At this point, the tool needs to be built from source, and it should be moved out to grpc-tools repository as a stand > [!NOTE]
alone application once it is mature enough. > At present, the tool needs to be built from source, and it should be moved out
> to grpc-tools repository as a stand alone application once it is mature
> enough. This tool in its current state though is not up to par in its
> user-friendliness. Other tools in the ecosystem, for example,
> [grpcurl](https://github.com/fullstorydev/grpcurl) are better maintained.
## Core functionality ## Core functionality
@ -18,21 +23,23 @@ The command line tool can do the following things:
- Infer request/response types from server reflection result. - Infer request/response types from server reflection result.
- Find the request/response types from a given proto file. - Find the request/response types from a given proto file.
- Read proto request in text form. - Read proto request in text form.
- Read request in wire form (for protobuf messages, this means serialized binary form). - Read request in wire form (for protobuf messages, this means serialized
binary form).
- Display proto response in text form. - Display proto response in text form.
- Write response in wire form to a file. - Write response in wire form to a file.
The command line tool should support the following things: The command line tool should support the following things:
- List server services and methods through server reflection. - List server services and methods through server reflection.
- Fine-grained auth control (such as, use this oauth token to talk to the server). - Fine-grained auth control (such as, use this oauth token to talk to the
server).
- Send streaming rpc. - Send streaming rpc.
## Code location ## Code location
To use the tool, you need to get the grpc repository and make sure your system To use the tool, you need to get the grpc repository and make sure your system
has the prerequisites for building grpc from source, given in the [installation has the prerequisites for building grpc from source, given in the
instructions](../BUILDING.md). [installation instructions](../BUILDING.md).
In order to build the grpc command line tool from a fresh clone of the grpc In order to build the grpc command line tool from a fresh clone of the grpc
repository, you need to run the following command to update submodules: repository, you need to run the following command to update submodules:
@ -58,10 +65,13 @@ https://github.com/grpc/grpc/blob/master/test/cpp/util/grpc_cli.cc
Most `grpc_cli` commands need the server to support server reflection. See Most `grpc_cli` commands need the server to support server reflection. See
guides for guides for
[Java](https://github.com/grpc/grpc-java/blob/master/documentation/server-reflection-tutorial.md#enable-server-reflection) [Java](https://github.com/grpc/grpc-java/blob/master/documentation/server-reflection-tutorial.md#enable-server-reflection)
, [C++](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md) ,
and [Go](https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md) [C++](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md)
and
[Go](https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md)
Local proto files can be used as an alternative. See instructions [below](#Call-a-remote-method). Local proto files can be used as an alternative. See instructions
[below](#Call-a-remote-method).
## Usage ## Usage
@ -176,8 +186,8 @@ We can send RPCs to a server and get responses using `grpc_cli call` command.
``` ```
If the proto file is not under the current directory, you can use If the proto file is not under the current directory, you can use
`--proto_path` to specify new search roots `--proto_path` to specify new search roots (separated by colon on
(separated by colon on Mac/Linux/Cygwin or semicolon on Windows). Mac/Linux/Cygwin or semicolon on Windows).
Note that the tool will always attempt to use the reflection service first, Note that the tool will always attempt to use the reflection service first,
falling back to local proto files if the service is not found. Use falling back to local proto files if the service is not found. Use

Loading…
Cancel
Save