> 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/commandreference/report.md).

# Report Files

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

## Table of Contents

* [1. Overview](#overview)
* [2. Subcommands](#subcommands)
  * [2.1 `list`](#report-list)
  * [2.2 `show`](#report-show)
* [3. Quick Summary](#quick-summary)
* [4. Usage Examples](#usage-examples)

***

## 1. Overview <a href="#overview" id="overview"></a>

The `report` command lists and prints the report files that AIDC commands write under the configured report path. Many commands (hardware health, firmware validation, SAT, etc.) produce JSON reports; `report` lets you inspect them without leaving the CLI, and lets the [AI assistant](/guide/latest/cli/commandreference/ai.md) read a report back and analyse it.

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

Reports are grouped into a category subdirectory under the report path, and each file is named after the task that produced it — `<category>/<task-id>.json`. The task ID defaults to `CLI_<operation>_<timestamp>`, or to whatever you pass with the global `--task-id` flag. For example, `aidc-cli chkhw brief` writes:

```
/home/admin/data/report/hardware-health/CLI_chkhw_brief_2026-06-29_14-02-11.json
```

Common category subdirectories: `hardware-health`, `hardware-spec`, `fw-validation`, `sensor`, `os-info`, `net-conn`, `port-mapping`, `bios-config`, `bios-bootorder`, `system-info`.

{% hint style="info" %}
The report path is configured with `aidc-cli init common-set -r <path>` (the deployed default is `/home/admin/data/report`). If it is not set, `report` will tell you so. All access is confined to that path — `report show` refuses to read files outside it.
{% endhint %}

***

## 2. Subcommands <a href="#subcommands" id="subcommands"></a>

### 2.1 `list` — List Report Files <a href="#report-list" id="report-list"></a>

Lists report files under the report path, newest first, with modification time and size.

```bash
aidc-cli report list [--limit <n>] [--match <substring>]
```

| Flag      | Required | Default | Description                                                            |
| --------- | :------: | :-----: | ---------------------------------------------------------------------- |
| `--limit` |     ❌    |   `20`  | Maximum number of files to list (`0` = all).                           |
| `--match` |     ❌    |    —    | Only list files whose path contains this substring (case-insensitive). |

Example output:

```
Report path: /home/admin/data/report
  2026-06-29 14:02:11     18432  hardware-health/CLI_chkhw_brief_2026-06-29_14-02-11.json
  2026-06-29 13:50:07      9210  fw-validation/CLI_chkfw_brief_2026-06-29_13-50-07.json
  2026-06-28 09:15:44    142880  hardware-spec/CLI_hwspec_summary_2026-06-28_09-15-44.json
```

### 2.2 `show` — Print a Report File <a href="#report-show" id="report-show"></a>

Prints a single report file. The path may be relative to (or within) the report path.

```bash
aidc-cli report show <file>
```

| Argument | Required | Description                                                         |
| -------- | :------: | ------------------------------------------------------------------- |
| `<file>` |     ✅    | Report file path, relative to or within the configured report path. |

{% hint style="info" %}
Output is capped at 1 MiB; longer files are truncated with a marker at the end. Paths that resolve outside the report path (including traversal and symlink escapes) are rejected.
{% endhint %}

***

## 3. Quick Summary <a href="#quick-summary" id="quick-summary"></a>

| Subcommand | Description                                             |
| ---------- | ------------------------------------------------------- |
| `list`     | List report files (newest first) under the report path. |
| `show`     | Print a report file, confined to the report path.       |

***

## 4. Usage Examples <a href="#usage-examples" id="usage-examples"></a>

```bash
# List the 20 most recent reports
aidc-cli report list

# List every firmware-validation report (no limit)
aidc-cli report list --limit 0 --match fw-validation

# Show a specific report
aidc-cli report show hardware-health/CLI_chkhw_brief_2026-06-29_14-02-11.json

# Pipe a report into the AI assistant for analysis
aidc-cli report show hardware-health/CLI_chkhw_brief_2026-06-29_14-02-11.json | aidc-cli ai chat -q "標出所有異常項目"
```

**See also:** [AI Assistant](/guide/latest/cli/commandreference/ai.md), [Initialization → Common Configuration](/guide/latest/cli/commandreference/init.md#common-configuration).
