ID | IEP-88 |
Author | |
Sponsor | |
Created |
|
Status | DRAFT |
Ignite 3 CLI tool is a command-line utility that acts as an entry point for all monitoring and management operations with Apache Ignite clusters. A user should download the tool from the website and then use it to:
The tool should be designed and developed with an explicit focus on usability and respect for https://clig.dev/#guidelines. In addition to regular commands, it should feature a fully-fledged REPL for different functions. REPL mode must provide the following capabilities:
REPL mode is used by default and is activated if the ignite command is executed without parameters.
The tool should connect to a remote cluster via the REST endpoints provided by the cluster. REST client can be generated from Open API specification (see IEP-87). For SQL REPL mode the JDBC is used.
If a user makes a mistake in syntax, an appropriate error message should be shown. It must describe what exactly is wrong. Possible options: unknown command, unknown parameter, missing mandatory parameter, etc.
In non-REPL mode, if a user attempts to execute a command that is only available in REPL, the tool should suggest using the REPL mode.
Errors and messing should be sent into stderr. The output of commands should be sent to stdout.
Generally (exclusions are defined on a case-by-case basis), every parameter for every command should have two name aliases: a long version starting with two dashes (e.g., --cluster-url
), and an optional short single-character version starting with a single dash (e.g., -c
).
The long version name can be separated from the value by either a space or by ‘=’:
--cluster-url localhost:8080
--cluster-url=localhost:8080
The short version name can be separated from the value only by a space:
-c localhost:8080
Options without a value (i.e. on-off switches) are allowed. If several such options in a single command are provided using their short names, they can be collapsed. For example, ignite -a -b -c
is equivalent to ignite -abc
.
CLI tool should have configurable defaults. They could be placed in the config file and modified by the user. For example:
ignite.cluster-url=http://localhost:3344
Help must be available for every command and should include at least the following:
REPL mode
command spec | alias | description |
---|---|---|
help | Full list of commands with their descriptions | |
help <command> | <command> --help[-h] | Detailed help for a specific command |
non-REPL mode
command spec | alias | description |
---|---|---|
ignite help | Full list of commands with their descriptions | |
ignite help <command> | ignite <command> --help[-h] | Detailed help for a specific command |
TBD
TBD