Using the CLI Tool
Run the GridGain 9 CLI in interactive or non-interactive mode, and configure its files, JVM properties, and default parameter values.
The GridGain CLI communicates with the cluster via the REST API, allowing you to configure the entire cluster or apply node-specific settings. You can run the CLI either in the interactive mode or execute commands without entering it.
Interactive CLI Mode
To use the CLI in the interactive mode, first run it, then configure the cluster or node using the update command.
For example, to add a new user to the cluster:
cluster config update ignite.security.authentication.providers.default.users=[{username=newuser,displayName=newuser,password="newpassword",passwordEncoding=PLAIN,roles=[system]}]Non-Interactive CLI Mode
Non-interactive mode is useful for quick updates or when running commands in scripts.
When running commands non-interactively, enclose arguments in quotation marks to ensure that special POSIX characters (such as { and }) are interpreted correctly:
bin/gridgain9 cluster config update "ignite.schemaSync={delayDurationMillis=500,maxClockSkewMillis=500}"bin/gridgain9.bat cluster config update "ignite.schemaSync={delayDurationMillis=500,maxClockSkewMillis=500}"Alternatively, you can use the backslash (\) to escape all special characters in your command. For example:
bin/gridgain9 cluster config update ignite.security.authentication.providers.default.users=\[\{username\=newuser,displayName\=newuser,password\=\"newpassword\",passwordEncoding\=PLAIN,roles\=\[system\]\}\]bin/gridgain9.bat cluster config update ignite.security.authentication.providers.default.users=\[\{username\=newuser,displayName\=newuser,password\=\"newpassword\",passwordEncoding\=PLAIN,roles\=\[system\]\}\]Non-interactive mode is also useful in automation scripts. For example, you can set configuration items in a Bash script as follows:
#!/bin/bash
...
bin/gridgain9 cluster config update "ignite.schemaSync={delayDurationMillis=500,maxClockSkewMillis=500}"
bin/gridgain9 cluster config update "ignite.security.authentication.providers.default.users=[{username=newuser,displayName=newuser,password=\"newpassword\",passwordEncoding=PLAIN,roles=[system]}]"Verbose Output
All CLI commands can provide additional output that can be helpful in debugging. You can specify the -v option multiple times to increase output verbosity. Single option shows REST request and response, second option (-vv) shows request headers, third one (-vvv) shows request body.
CLI Tool Files
CLI tool stores additional files required for its operation on your local machine. These files are required for its normal operation and include defaults, history, logs and secrets. By default, these files are stored in the following locations:
~/.local/state/ignitecli/logsdirectory contains CLI tool logs;~/.local/state/ignitecli/historyfile contains the history of CLI tool commands;~/.config/ignitecli/defaultsfile contains the default values to be used for CLI tool configuration for each profile;~/.config/ignitecli/secretsfile contains potentially sensitive information such as passwords and other authorization information.
Configuration
You can configure the directories with the following methods:
Individually configure the location of the files with the following environment variables:
IGNITE_CLI_LOGS_DIR- configures the location of the logs directory;IGNITE_CLI_CONFIG_FILE- configures the location of thedefaultsfile;IGNITE_CLI_SECRET_CONFIG_FILE- configures the location of thesecretsfile.
Configure home environment variables:
$XDG_STATE_HOME- sets the CLI tool home directory that will be used for storing logs and history;$XDG_CONFIG_HOME- sets the CLI tool configuration home directory that will be used to store configuration files.
Set the user directory in the
user.homeJVM property.
Overriding JVM Properties
You can override the default CLI tool JVM properties by specifying them in the GRIDGAIN9_OPTS environment variable before running the start script.
Default Parameter Values
Some parameters are optional because the CLI can resolve their values automatically from the profile configuration or the current session state. The --url parameter for all cluster and node commands works this way. This is the only parameter with this resolution behavior.
The resolution order depends on whether the CLI is running in interactive (REPL) or non-interactive mode.
Non-Interactive Mode
The value for --url is resolved in the following order:
Explicitly provided value:
--url=<clusterUrl>.If
--profile=<profileName>is specified, theignite.cluster-endpoint-urlproperty from the specified CLI profile is used.If neither is provided, or if the specified CLI profile does not define
ignite.cluster-endpoint-url, the value is taken from the currently active profile.
Interactive (REPL) Mode
The value for --url is resolved in the following order:
Explicitly provided value:
--url=<clusterUrl>.If
--profile=<profileName>is specified, theignite.cluster-endpoint-urlproperty from the specified CLI profile is used.If no URL was resolved from the previous steps and the CLI is currently connected to a node, the URL of the connected node is used.
If no URL was resolved from the previous steps and the CLI is not connected to a node, the value is taken from the currently active profile.
See Also
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

