For the complete documentation index, see llms.txt. This page is also available as Markdown.

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/logs directory contains CLI tool logs;

  • ~/.local/state/ignitecli/history file contains the history of CLI tool commands;

  • ~/.config/ignitecli/defaults file contains the default values to be used for CLI tool configuration for each profile;

  • ~/.config/ignitecli/secrets file contains potentially sensitive information such as passwords and other authorization information.

Windows systems the %USERPROFILE% address instead of ~ for user home directory.

Configuration

You can configure the directories with the following methods:

  1. 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 the defaults file;

    • IGNITE_CLI_SECRET_CONFIG_FILE - configures the location of the secrets file.

  2. Configure home environment variables:

    These configuration variables follow the XDG Base Directory Specification and do not override the parameters from the previous step.

    • $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.

  3. Set the user directory in the user.home JVM 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.

We recommend explicitly limiting the CLI's memory footprint by setting -Xms and -Xmx to lower values before launching the tool.

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:

  1. Explicitly provided value: --url=<clusterUrl>.

  2. If --profile=<profileName> is specified, the ignite.cluster-endpoint-url property from the specified CLI profile is used.

  3. 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:

  1. Explicitly provided value: --url=<clusterUrl>.

  2. If --profile=<profileName> is specified, the ignite.cluster-endpoint-url property from the specified CLI profile is used.

  3. 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.

  4. 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.

spinner

Last updated

Was this helpful?