Configuration

Commands to configure the HDXCLI. Manage connection profiles to your clusters and set default contexts (project/table) to streamline your operations.

hdxcli v1.0.83

Init

Initialize the HDXCLI configuration for first-time use.

This command guides you through creating the initial configuration file and setting up your 'default' profile. It is intended to be run only once. If a configuration already exists, the command will exit with an error to prevent overwriting settings.

Usage

hdxcli init [OPTIONS]

Example Output

The following is a sample of the interactive init session:

$ hdxcli init
No configuration found for your Hydrolix cluster.
Let's create the 'default' profile to get you started.

----- Configuring Profile [default] -----

? Enter the host address for the profile: host.hydrolix.dev
? Use TLS (https) for connection? Yes

The configuration for 'default' profile has been created.
Please login to profile 'default' (host.hydrolix.dev) to continue.
Username: [email protected]
Password for [[email protected]]:

----- Service Account Configuration -----
A Service Account can be configured for automated access.
? How would you like to authenticate for this profile? Create a new Service Account
? What is the name for the new Service Account? user_sa
? Select roles to assign: ['user_admin']
? Enter token duration (e.g., 30d, 1y) or leave blank for default (1 year): 180d

Profile 'default' is now configured to use Service Account 'user_sa'.
----- End of Service Account Configuration -----

Configuration complete. You can now use hdxcli to manage your cluster.

Profile

Manage connection profiles for your Hydrolix clusters.

Usage

hdxcli profile [OPTIONS] COMMAND [ARGS]...

Add

Add a new profile. This command can be run interactively or by providing all options.

Usage

hdxcli profile add [OPTIONS] PROFILE_NAME

Options

OptionDescription
--hostname TEXTHostname of the cluster.
--scheme [http|https]Protocol for the connection.

Examples

# Start the interactive guide to create a new profile
hdxcli profile add my_profile

# Add a new profile non-interactively
hdxcli profile add my_profile --hostname example.hydrolix.dev --scheme https

Delete

Delete a profile.

Usage

hdxcli profile delete [OPTIONS] PROFILE_NAME

Options

OptionDescription
-y, --yesSkip confirmation prompt.

Examples

# Delete the profile named 'my_profile'
hdxcli profile delete my_profile

Edit

Interactively edit an existing profile.

Usage

hdxcli profile edit [OPTIONS] PROFILE_NAME

Examples

# Start the interactive editor for the 'default' profile
hdxcli profile edit default

List

List all available profiles.

Usage

hdxcli profile list [OPTIONS]

Examples

# List all configured profiles
hdxcli profile list

Logout

Log out from a profile by deleting its session cache.

Usage

hdxcli profile logout [OPTIONS] PROFILE_NAME

Options

OptionDescription
-y, --yesSkip confirmation prompt.

Examples

# Log out from the 'default' profile, skipping confirmation
hdxcli profile logout default --yes

Show

Show details for a specific profile.

Usage

hdxcli profile show [OPTIONS] PROFILE_NAME

Examples

# Show the configuration for the 'default' profile
hdxcli profile show default

Set

Set the default project and table for the current profile.

This command stores the provided project and table names in the current profile, allowing other commands to use them by default without needing the --project or --table options.

Usage

hdxcli set [OPTIONS] PROJECT_NAME TABLE_NAME

Examples

# Set the default project
hdxcli set web_proj

# Set the default project and table
hdxcli set web_proj dns_logs

Unset

Clear the default project and table from the current profile.

Usage

hdxcli unset [OPTIONS]

Examples

# Unset the default project and table
hdxcli unset