> ## Documentation Index
> Fetch the complete documentation index at: https://ultrarag.openbmb.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

## help — 命令概览

```bash theme={null}
ultrarag --help
```

```text theme={null}
usage: ultrarag [-h] {build,run,show} ...

UltraRAG CLI

positional arguments:
  {build,run,show}
    build           Build the configuration
    run             Run the pipeline with the given configuration
    show            Show ui interfaces

options:
  -h, --help        show this help message and exit
```

***

## build — 构建配置

**用途**：基于 `pipeline.yaml` 自动生成统一的参数配置文件。

```bash theme={null}
ultrarag build <CONFIG> [--log_level DEBUG|INFO|WARN|ERROR]
```

| 参数            | 描述                                         |
| ------------- | ------------------------------------------ |
| `<CONFIG>`    | Pipeline 配置文件路径，如 `examples/pipeline.yaml` |
| `--log_level` | 日志级别，默认 `INFO`                             |

***

## run — 执行 Pipeline

**用途**：启动 Pipeline 执行。

```bash theme={null}
ultrarag run <CONFIG> [--param <PARAM_FILE>] [--is_demo] [--log_level DEBUG|INFO|WARN|ERROR]
```

| 参数                     | 描述                              |
| ---------------------- | ------------------------------- |
| `<CONFIG>`             | 待执行的 `pipeline.yaml` 路径         |
| `--param <PARAM_FILE>` | 自定义参数文件路径，覆盖默认 `parameter/` 下文件 |
| `--is_demo`            | 启用演示模式                          |
| `--log_level`          | 日志级别，默认 `INFO`                  |

***

## show ui — 启动 Web 控制界面

**用途**： 启动UI界面。

```bash theme={null}
ultrarag show ui [--host 127.0.0.1] [--port 5050] [--admin] [--log_level DEBUG|INFO|WARN|ERROR]
```

| 参数            | 描述                                       |
| ------------- | ---------------------------------------- |
| `--host`      | 网页服务绑定 IP（默认 `127.0.0.1`）                |
| `--port`      | 网页服务端口（默认 `5050`）                        |
| `--admin`     | 启动完整管理员 UI（含 Pipeline 构建器），默认仅启动 Chat 模式 |
| `--log_level` | 日志级别，默认 `INFO`                           |

启动后访问 `http://<host>:<port>` 即可使用 UI。
