> For the complete documentation index, see [llms.txt](https://asus-isg-aidc.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asus-isg-aidc.gitbook.io/guide/latest/cli/commonflags.md).

# Common Flags and Options

| Developer | Last modified |
| --------- | ------------- |
| AIDC Team | 2026/07/06    |

## 1. Global Flags

These flags are available on all commands when a valid license is active.

| Flag              | Short | Type   | Description                                                                    | Example            |
| ----------------- | :---: | ------ | ------------------------------------------------------------------------------ | ------------------ |
| `--limit-hosts`   |  `-l` | string | Limit the operation to specific hosts, specified as a comma-separated list     | `-l node01,node02` |
| `--exclude-hosts` |  `-e` | string | Exclude specific hosts from the operation, specified as a comma-separated list | `-e node03,node04` |
| `--task-id`       |  `-i` | string | Assign a task ID for tracking the current operation                            | `-i TASK-001`      |

### Root-Level Flags

| Flag        | Short | Description                           |
| ----------- | :---: | ------------------------------------- |
| `--version` |  `-v` | Show AIDC-CLI version information     |
| `--help`    |  `-h` | Show help for a command or subcommand |

{% hint style="info" %}
Use `aidc-cli -v` or `aidc-cli --version` on its own. The version flag is handled only by the root command and must not be combined with an additional command or argument.
{% endhint %}

***

## 2. Usage Examples

### Limiting Hosts

```bash
# Run only on specific nodes
aidc-cli bmc power-on -l node01,node02,node03

# Deploy OS on a single node
aidc-cli deploy install -l node05

# Check firmware versions on selected nodes
aidc-cli chkfw summary -l node01,node10
```

### Excluding Hosts

```bash
# Deploy OS on all nodes except node04
aidc-cli deploy install -e node04

# Run OS inventory while excluding management nodes
aidc-cli osinfo summary -e mgmt01,mgmt02
```

### Combining Flags

```bash
# Run on specific nodes with a task ID
aidc-cli bmc bmc-ver -l node01,node02 -i TASK-BMC-001

# Validate a SAT baseline for selected nodes
aidc-cli sat validate --baseline golden-v1 -l node01,node02 -i TASK-SAT-001
```

***

## 3. Common Flag Patterns by Command

### Output and Report Flags

| Command        | Flag                  | Short | Description                                              |
| -------------- | --------------------- | :---: | -------------------------------------------------------- |
| `license show` | `--json`              |  `-j` | Output license information in JSON format                |
| `chknet *`     | `--stdout`            |  `-o` | Output the validation report to stdout                   |
| `ib-sat check` | `--stdout`            |  `-o` | Output the IB fabric SAT report to stdout                |
| `sysinfo`      | `--stdout`            |   —   | Output raw system information to stdout                  |
| `hwspec *`     | `--stdout`            |   —   | Output hardware specification JSON to stdout             |
| `hwinv *`      | `--stdout`            |   —   | Output raw hardware inventory JSON to stdout             |
| `chkhw *`      | `--stdout`            |   —   | Output raw hardware health JSON to stdout                |
| `chkfw *`      | `--stdout`            |   —   | Output firmware version inventory JSON to stdout         |
| `osinfo *`     | `--stdout`            |   —   | Output raw OS inventory JSON to stdout                   |
| `sat *`        | `--stdout`            |   —   | Output the SAT report JSON to stdout                     |
| `report list`  | `--limit` / `--match` |   —   | Limit the number of listed reports / filter by substring |

### Collection, View, and Scope Flags

| Command               | Flag           | Short | Description                                                     |
| --------------------- | -------------- | :---: | --------------------------------------------------------------- |
| `hwsensor *`          | `--source`     |   —   | Choose the sensor source (`inband` or `redfish` when supported) |
| `hwsensor *`          | `--interval`   |  `-I` | Seconds between sensor requests                                 |
| `hwsensor *`          | `--times`      |   —   | Number of sensor collection iterations                          |
| `hwsensor *`          | `--background` |  `-b` | Run hardware sensor monitoring in background mode               |
| `sat baseline create` | `--domains`    |   —   | Select SAT domains to include in the baseline                   |
| `sat baseline create` | `--view`       |   —   | Choose the SAT collection view: `brief` or `summary`            |
| `sat validate`        | `--domains`    |   —   | Limit drift validation to selected SAT domains                  |
| `sat validate`        | `--view`       |   —   | Choose the SAT report view: `brief` or `summary`                |

### File and Path Inputs

| Command              | Flag              | Short | Description                                                                                                        |
| -------------------- | ----------------- | :---: | ------------------------------------------------------------------------------------------------------------------ |
| `driver mlnx-ofed`   | `--file`          |  `-f` | Driver package file path                                                                                           |
| `driver nv-gpu`      | `--file`          |  `-f` | GPU driver installer file path                                                                                     |
| `driver doca-host-*` | `--file`          |  `-f` | DOCA package file path                                                                                             |
| `fwupdate bios`      | `--file`          |  `-f` | BIOS firmware file name for tool or local Redfish updates                                                          |
| `fwupdate bmc`       | `--file`          |  `-f` | BMC firmware file name for tool or local Redfish updates                                                           |
| `fwupdate mlnx`      | `--file`          |  `-f` | Mellanox firmware file name                                                                                        |
| `fwupdate nvme`      | `--file`          |  `-f` | Override NVMe firmware file name from init configuration                                                           |
| `fwupdate nvlink-sw` | `--nvos`          |   —   | NVOS image file name for NVLink switch updates (component files: `--bmc`, `--fpga`, `--erot`, `--cpld1`, `--bios`) |
| `pkg nvlink-sw`      | `--file`          |  `-f` | NVLink switch OS file path                                                                                         |
| `ufm deploy`         | `--licenses-path` |  `-p` | Override the UFM licenses path for one deployment run                                                              |
| `weka server deploy` | `--weka-iso`      |  `-I` | WEKA ISO image filename                                                                                            |

***

## 4. Shell Auto-Completion

AIDC-CLI provides context-aware shell completion. After setup, use `Tab` to auto-complete:

* Command names: `aidc-cli b<Tab>` expands to commands such as `bmc` or `bios`
* Subcommands: `aidc-cli weka <Tab>` expands to `server` and `client`
* Flag names: `aidc-cli sat validate --<Tab>` expands to `--baseline`, `--domains`, `--view`, and `--stdout`
* Flag values: `aidc-cli hwsensor temperature --source <Tab>` expands to supported source values
* Host names: `aidc-cli bmc power-on -l <Tab>` expands to available host names

***

## 5. Exit Codes

| Code | Meaning                                                                         |
| :--: | ------------------------------------------------------------------------------- |
|  `0` | Success                                                                         |
|  `1` | General error such as invalid flags, missing requirements, or execution failure |

***

## 6. Logging

AIDC-CLI writes command progress and execution details to its standard logging destinations.

* Console output: user-facing status and result messages
* File logs: detailed logs for troubleshooting and auditing
* Task-oriented records: execution traces associated with the current command remark and optional task ID
