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

# Hello

> 验证 CLI 安装和 Lager Box 连接

用于快速验证 CLI 安装、Lager Box 连接，并显示 Box 版本的命令。

## 语法

```bash theme={null}
lager hello [OPTIONS]
```

## 选项

| 选项           | 说明                  |
| ------------ | ------------------- |
| `--box TEXT` | Lager Box 名称或 IP 地址 |
| `--help`     | 显示帮助信息并退出           |

***

## 用法

```bash theme={null}
# 基本的 hello 命令
lager hello

# 对指定 Lager Box 执行 hello
lager hello --box my-lager-box

# 用 Lager Box 的 IP 执行 hello
lager hello --box <BOX_IP>
```

***

## 输出

hello 命令打印 Box 名称、它的 IP 地址、Box 版本，以及一行成功信息：

```text theme={null}
$ lager hello --box my-lager-box

Box: my-lager-box
IP: 100.64.1.42
Version: 0.47.0 (v0.47.0@1fbc4c39fce62f1041d439d1b164bbf7b6f6ad3a)

my-lager-box is online and responding!
```

括号中的值是该 Box 运行的 ref，格式为 `<ref>@<commit>`。从分支或提交部署的 Box 会附加 `-- not a release build`：

```text theme={null}
Version: 0.47.0 (main@5d84c68612384eed2854638c1e0941a4ff8b7893 -- not a release build)
```

早于 ref 记录功能的 Box 只显示版本号。如果 Box 不报告版本，该行显示
`Version: Unknown`。如果 Box 对 `/hello` 返回错误，最后一行显示
`my-lager-box responded with HTTP <code>`。

***

## 示例

```bash theme={null}
# 初次配置之后验证连通性
lager hello --box my-lager-box

# 快速检查默认 Box 是否可访问
lager defaults add --box my-lager-box
lager hello

# 检查某台 Box 的版本
lager hello --box my-lager-box
```

***

## 说明

* 用于测试 CLI 安装的简单验证命令
* 验证与 Lager Box 的连通性
* 从端口 9000 上的 Box API（`/status`）读取版本和 ref，然后检查 `/hello`
* 适合排查连接问题
* 设置了默认 Box 时不需要任何参数
* 连接正常时返回一条成功信息
