> 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/v1.4.0/cli.md).

# CLI User Guide

| Developer | Last modified |
| --------- | ------------- |
| AIDC Team | 2026/02/12    |

## 1. Overview

AIDC-CLI (ASUS Infrastructure Deployment Center - Command Line Interface) is a command-line tool for HPC (High Performance Computing) infrastructure automation. It provides modular commands covering the complete lifecycle of cluster management: from initial license activation and node provisioning, through OS deployment and network configuration, to application-level services like Slurm, Kubernetes, and container engines.

### 1.1 Key Capabilities

| Category           | Features                                                                                          |
| ------------------ | ------------------------------------------------------------------------------------------------- |
| **Infrastructure** | BMC/IPMI control, PXE-based OS deployment, DHCP management                                        |
| **Network**        | Ethernet bonding, InfiniBand (IPoIB), NVOS, NIC link-type, DPU mode switching                     |
| **Hardware**       | Sensor monitoring (temperature/power/fan), specification validation, firmware validation & update |
| **Drivers**        | NVIDIA GPU, Mellanox OFED, DOCA (NIC/DPU)                                                         |
| **System**         | Timezone, NTP, SSH, repository, limits.conf, sysctl, SELinux, firewall, subscription              |
| **Storage**        | Software RAID, LVM, disk cleanup, WEKA distributed storage                                        |
| **Workloads**      | Slurm cluster, MariaDB Galera, Docker, Podman, Native Kubernetes, UFM, NMX-M                      |

### 1.2 Architecture

![AIDC-CLI Architecture](https://pub-f334ff01208c4e6195b80133ac6e6030.r2.dev/cli/aidc-cli-module.png)

### 1.3 Command Structure

```bash
aidc-cli <command> <subcommand> [flags]
```

**Global Flags** (available on all commands when license is active):

| Flag              | Short | Description                                                 |
| ----------------- | :---: | ----------------------------------------------------------- |
| `--limit-hosts`   |  `-l` | Limit operation to specific hosts (comma-separated)         |
| `--exclude-hosts` |  `-e` | Exclude specific hosts from the operation (comma-separated) |
| `--task-id`       |  `-i` | Task ID for tracking the current operation                  |
| `--version`       |  `-v` | Show version information                                    |
| `--help`          |  `-h` | Show help for any command                                   |

***

## 2. Typical Workflow

The recommended order of operations for a new cluster deployment:

```mermaid
flowchart LR
    S1["1. License<br/>Activation"]
    S2["2. Init &<br/>Inventory"]
    S3["3. BMC<br/>Configuration"]
    S4["4. OS<br/>Deployment"]
    S5["5. Network &<br/>Driver Setup"]
    S6["6. Application<br/>Deployment"]
    S7["7. Validation<br/>& Monitoring"]

    S1 --> S2 --> S3 --> S4 --> S5 --> S6 --> S7
```

| Step | Commands                                                | Description                                                   |
| :--: | ------------------------------------------------------- | ------------------------------------------------------------- |
|   1  | `aidc-cli license active -k <key>`                      | Activate AIDC license to unlock all features                  |
|   2  | `aidc-cli init common-set`, `init inventory`            | Configure project settings and render node inventory from CSV |
|   3  | `aidc-cli bmc init-pwd`, `bmc bmc-net`                  | Initialize BMC passwords and network settings                 |
|   4  | `aidc-cli deploy install`                               | PXE-boot and install OS on target nodes                       |
|   5  | `aidc-cli network eth-cfg`, `driver nv-gpu -f <file>`   | Configure network interfaces and install drivers              |
|   6  | `aidc-cli slurm setup-cluster`, `kubernetes k8s-native` | Deploy workload managers and services                         |
|   7  | `aidc-cli chknet pxe`, `chkfw all-version`              | Validate network connectivity, firmware versions              |

***

## 3. Command Overview

All available top-level commands (requires active license unless noted):

|  #  | Command                                                                         | CLI Name     | Description                                                       |
| :-: | ------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------- |
|  1  | [License Management](/guide/v1.4.0/cli/commandreference/license.md)             | `license`    | Activate and show license information *(no license required)*     |
|  2  | [Initialization](/guide/v1.4.0/cli/commandreference/init.md)                    | `init`       | Configure AIDC settings, inventory, DHCP, BMC, groups, etc.       |
|  3  | [BMC Operations](/guide/v1.4.0/cli/commandreference/bmc.md)                     | `bmc`        | BMC/IPMI remote management (power, password, network, PXE boot)   |
|  4  | [OS Deployment](/guide/v1.4.0/cli/commandreference/deploy.md)                   | `deploy`     | OS installation, DHCP service, SSH keys, image download           |
|  5  | [Network Configuration](/guide/v1.4.0/cli/commandreference/network.md)          | `network`    | Ethernet, bonding, InfiniBand, NVOS, link-type, DPU mode          |
|  6  | [Network Validation](/guide/v1.4.0/cli/commandreference/networkvalidation.md)   | `chknet`     | PXE, BMC, InfiniBand, Ethernet port mapping validation            |
|  7  | [Hardware Sensor](/guide/v1.4.0/cli/commandreference/hardwaresensor.md)         | `hwsensor`   | Temperature, power, fan monitoring (IPMI & Redfish)               |
|  8  | [Hardware Specification](/guide/v1.4.0/cli/commandreference/hardwarespec.md)    | `hwspec`     | CPU, memory, disk, NIC, GPU, PCIe, PSU validation                 |
|  9  | [Firmware Validation](/guide/v1.4.0/cli/commandreference/firmwarevalidation.md) | `chkfw`      | BMC, BIOS, RAID, InfiniBand firmware version checks               |
|  10 | [Firmware Update](/guide/v1.4.0/cli/commandreference/firmwareupdate.md)         | `fwupdate`   | BIOS, BMC, Mellanox NIC/DPU, NVMe firmware updates                |
|  11 | [Package Management](/guide/v1.4.0/cli/commandreference/package.md)             | `pkg`        | Install/remove system packages, NVLink switch OS update           |
|  12 | [Driver Installation](/guide/v1.4.0/cli/commandreference/driver.md)             | `driver`     | Mellanox OFED, DOCA NIC/DPU, NVIDIA GPU driver installation       |
|  13 | [System Configuration](/guide/v1.4.0/cli/commandreference/sysconfig.md)         | `syscfg`     | NTP, timezone, SSH, repo, limits, sysctl, RAID, LVM, subscription |
|  14 | [Security Settings](/guide/v1.4.0/cli/commandreference/security.md)             | `security`   | Firewall enable/disable/rules, SELinux management                 |
|  15 | [Slurm Workload Manager](/guide/v1.4.0/cli/commandreference/slurm.md)           | `slurm`      | Slurm cluster setup (controller + compute + accounting DB)        |
|  16 | [Database Management](/guide/v1.4.0/cli/commandreference/database.md)           | `database`   | MariaDB Galera cluster deployment                                 |
|  17 | [System Information](/guide/v1.4.0/cli/commandreference/sysinfo.md)             | `sysinfo`    | Collect and display system information reports                    |
|  18 | [UFM Management](/guide/v1.4.0/cli/commandreference/ufm.md)                     | `ufm`        | Unified Fabric Manager standalone deployment                      |
|  19 | [Container Management](/guide/v1.4.0/cli/commandreference/container.md)         | `container`  | Docker and Podman engine deployment                               |
|  20 | [Kubernetes Cluster](/guide/v1.4.0/cli/commandreference/kubernetes.md)          | `kubernetes` | Native Kubernetes cluster deployment                              |
|  21 | [NMX Management](/guide/v1.4.0/cli/commandreference/nmx.md)                     | `nmx`        | NMX-M virtual machine deployment                                  |
|  22 | [WEKA Storage](/guide/v1.4.0/cli/commandreference/weka.md)                      | `weka`       | WEKA distributed storage deployment                               |

***

## 4. Quick Start Examples

```bash
# Show version
aidc-cli -v

# Activate license
aidc-cli license active -k "XXXX-XXXX-XXXX-XXXX"

# Show license info
aidc-cli license show

# Render inventory from CSV
aidc-cli init inventory

# Power on specific nodes
aidc-cli bmc power-on -l node01,node02

# Deploy OS (excluding one node)
aidc-cli deploy install -e node04

# Validate network connectivity
aidc-cli chknet pxe

# Install Slurm cluster
aidc-cli slurm setup-cluster
```

***

## 5. Prerequisites

Before using AIDC-CLI, ensure the following are in place:

| Requirement       | Description                                                              |
| ----------------- | ------------------------------------------------------------------------ |
| **License**       | Valid AIDC license file activated via `aidc-cli license active`          |
| **OS**            | RHEL 8.9/9.4/9.6, Rocky Linux 8.10, or Ubuntu 22.04.5 on management node |
| **SSH**           | Passwordless SSH from management node to all target nodes                |
| **Node Database** | CSV files populated with node inventory                                  |
| **Network**       | Management node reachable to all target nodes and BMC interfaces         |
| **DHCP**          | DHCP configured on management node (for PXE-based OS deployment)         |

***

## 6. Related Resources

* [Portal User Guide](https://gitlab.com/AIDCTeam/gitbook-docs-portal/-/tree/release/v1.4.0/projects/AIDC/guide/README.md): Web-based management interface
* [Installation & Setup](/guide/v1.4.0/portal/installation.md): Infrastructure provisioning overview
* [Marketplace](https://gitlab.com/AIDCTeam/gitbook-docs-portal/-/tree/release/v1.4.0/projects/AIDC/guide/Marketplace/overview.md): Application deployment catalog

***

## 7. Getting Help

```bash
# Main help
aidc-cli --help

# Command help
aidc-cli <command> --help

# Subcommand help
aidc-cli <command> <subcommand> --help
```

For shell auto-completion setup, see [Installation and Setup](/guide/v1.4.0/cli/installation.md).
