> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/zenlayer-cli/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/zenlayer-cli/usage/help.md).

# Help Commands

This guide introduces how to use Zenlayer Cloud CLI help commands to get command information.

## Using Help Commands

Zenlayer Cloud CLI provides several ways to get help information for commands:

### 1. View Global Help

To view global help information, including all available commands and global options, run:

```bash
zeno --help
```

Or use the shorthand:

```bash
zeno -h
```

### 2. View Service Command Help

To view help information for a specific service command, such as the Elastic Compute service:

```bash
zeno zec --help
```

### 3. View Specific Command Help

To view detailed help information for a specific command, such as the `describe-instances` command:

```bash
zeno zec describe-instances --help
```

## Help Information Structure

Help information typically contains the following sections:

### 1. Command Name and Description

Displays the name and brief description of the command, explaining its purpose.

### 2. Command Syntax

Displays the syntax format of the command, including required and optional parameters.

### 3. Options

Lists all options supported by the command, including:

* Option name (e.g., `--instance-id`)
* Option shorthand (e.g., `-i`)
* Option type (e.g., `string`, `boolean`, etc.)
* Option description

### 4. Examples

Provides usage examples for the command to help users understand how to use it.

### 5. Subcommand Help Output Field Descriptions

When running the help command for a subcommand (e.g., `zeno zec describe-instances --help`), the output contains the following fields:

#### NAME

Displays the name of the command.

Example:

```
NAME
       zec describe-instances -
```

#### DESCRIPTION

Provides a detailed description of the command, explaining its functionality and use cases.

Example:

```
DESCRIPTION
       Describes one or more instances.

       If you specify one or more instance IDs, Zenlayer returns information for those instances. If you do not specify instance IDs, Zenlayer returns information for all relevant instances. If you specify an invalid instance ID, an error is returned. If you specify an instance that you do not own, it is not included in the returned results.
```

#### SYNOPSIS

Displays the basic syntax of the command, including the command name and all options. Optional options are enclosed in brackets `[]`.

Example:

```
SYNOPSIS
          describe-instances
          [--instance-ids <value>]
          [--page-num <value>]
          [--page-size <value>]
          [--status <value>]
          [--zone-id <value>]
```

#### OPTIONS

Lists all options supported by the command, each containing:

* Option name (e.g., `--instance-ids`)
* Option type (e.g., `list`, `string`, etc.)
* Option description

Example:

```
OPTIONS
       --instance-ids (list)
          Instance IDs.
          You can query up to 100 instances in each request.

       --zone-id (string)
          Zone ID to which the instances belong.

       --image-id (string)
          Image ID.

       --ipv4-address (string)
          IPv4 addresses.

       --ipv6-address (string)
          IPv6 addresses.

       --status (string)
          Instance status.

          Possible values:

          o DEPLOYING - Creating.

          o REBUILDING - Rebuilding.

          o REBOOT - Rebooting.

          o RUNNING - Running.

          o STOPPED - Powered off.

          o BOOTING - Powered on.

          o RELEASING - Releasing.

          o STOPPING - Powering off.
```

#### OUTPUT

Lists the fields returned on successful execution, i.e. the contents of the `response` object in the API response (excluding `requestId`). Each field shows its name, type, and description. If this section is absent, the command returns only a `requestId` on success.

Example:

```
OUTPUT
       totalCount -> (integer)
           Number of instances meeting the filtering conditions.

       dataSet -> (list)
           Information on an instance.
```

#### GLOBAL OPTIONS

Lists all global options, including profile, output format, query, and other common options.

Example:

```
GLOBAL OPTIONS
       --access-key-id (string)
          access key ID (overrides config)

       --access-key-secret (string)
          access key secret (overrides config)

       --cli-dry-run (bool)
          preview the API request without sending it

       --debug (bool)
          enable debug mode

       --endpoint (string)
          API domain/endpoint (overrides default)

       --help (bool)
          help for this command

       --output (string)
          output format: json, table (default: from config)

       --profile (string)
          profile name to use (default: from config)

       --query (string)
          JMESPath query to filter response (e.g. dataSet[*].instanceId)
```

## Tips for Using Help Commands

### 1. Quick Command Overview

When you are unsure about a command's purpose or parameters, use the `--help` option for a quick overview.

### 2. Check Command Parameters

Use help commands to view all parameters supported by a command, ensuring you use the correct parameter names and formats.

### 3. Learn from Command Examples

Examples in the help information can help you understand how to correctly use commands, especially for complex ones.

### 4. Explore Command Hierarchy

Through help commands, you can explore the Zenlayer Cloud CLI command hierarchy to discover available commands and subcommands.

## FAQ

### Incomplete Help Information

If help information is incomplete or inaccurate, check:

* Whether the CLI is the latest version
* Whether the command exists
* Whether the network connection is working

### Command Does Not Exist

If running `--help` shows the command does not exist, check:

* Whether the command is spelled correctly
* Whether the service supports the command
* Whether the CLI is the latest version

## Related Documentation

* [Command Structure](/zenlayer-cli/usage/command-structure.md) - Learn about the basic structure of CLI commands
* [Parameter Types](/zenlayer-cli/usage/parameter-types.md) - Learn about different parameter type usage


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/zenlayer-cli/usage/help.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
