FAQ

Answers to frequently-asked questions about HDXCLI

How do I show the HDXCLI command help?

In order to see what you can do with the tool:

hdxcli --help

Check which commands are available for each resource by typing:

hdxcli <resource-name> --help

Where are the HDXCLI configuration files stored?

The HDX_CONFIG_DIR environment variable specifies the location of the files used by hdxcli to store configuration profiles. The default directory path is ~/.hdx_cli/.

How do I perform operations against another server?

If you want to use hdxcli against another server, use the --profile option:

hdxcli --profile <profile-name> project list

How do I delete resources?

When you want to delete a resource, hdxcli will prompt you type delete this resource to continue deleting the resource, like this:

hdxcli project delete <project-name>  
Please type 'delete this resource' to delete: delete this resource  
Deleted <project-name>

If you want to skip the confirmation prompt, you can add --disable-confirmation-prompt as follows:

hdxcli project delete <project-name> --disable-confirmation-prompt  
Deleted <project-name>

Can I pretty-print resource information?

When using the 'show' command on any resource, the output appears as follows:

hdxcli project --project <project-name> show  
{"name": "project-name", "org": "org-uuid", "description": "description", "uuid": "uuid", ...}

If you want an indented JSON version, simply add the -i, --indent option:

hdxcli project --project <project-name> show --indent  
{  
    "name": "project-name",  
    "org": "org-uuid",  
    "description": "description",  
    "uuid": "uuid",  
    ...,  
}

Note: The --indent option no longer requires an integer value; it is now a boolean option for improved simplicity.

Can I configure the API request timeout?

By default, HDXCLI waits for 30 seconds when a request is performed. However, you can modify this timeout if the cluster takes more time to respond. The --timeout INT option allows you to specify the duration in seconds and can be used with any command by placing it after the root command, as follows:

hdxcli --timeout 60 project delete <project-name> --disable-confirmation-prompt
hdxcli --timeout 120 migrate <target-cluster-username> <target-cluster-hostname> -p <target-cluster-password> -u <target-cluster-uri-scheme> -b <project-1-to-migrate> -b <project-2-not-to-migrate>

Is there a debug mode?

The --debug option allows you to run commands in debug mode, providing additional information for troubleshooting purposes. When enabled, hdxcli will display detailed debugging information, such as request and response details, which can be helpful for diagnosing issues.

hdxcli --debug command [...]