---
url: /v6.2/en-us/cli-reference.md
---
# CLI Command Reference

These pages are organized by **top-level command families** and add **minimal runnable examples, representative output snippets, and common next steps** for the high-frequency command families. Their job is to help you quickly:

* find the minimal runnable command
* see what representative output looks like
* know which command usually comes next

If you already know that your task is about apps, dashboards, datasets, pipelines, or permissions, this reference is usually more direct than jumping through workflow pages repeatedly.

## How to use this reference

Recommended order:

1. Find the relevant command family on this page
2. Open the corresponding subpage and run the **minimal runnable example**
3. Use the **representative output** to judge whether the result looks correct
4. Follow the **common next steps** to continue
5. Use the CLI `--help` output whenever you need exact flags

## Global options

These options appear across most commands:

| Option | Purpose | Typical use |
| --- | --- | --- |
| `-o, --output` | Select output format | `table` for direct reading, `json` / `yaml` for agents, scripts, and CI |
| `-c, --config` | Select a config file path | Switch between local config files explicitly |
| `--api-url` | Override the target instance API URL | Temporarily override `HBI_HOST` / the saved local default host; accepts a bare host or a host with subpath, and probes `https://` first then `http://` when the scheme is omitted; `HBI_API_URL` is compatibility-only |
| `--token` | Override the current access token | Use a temporary token instead of saved credentials; no durable refresh guarantee |
| `--dry-run` | Preview a write without executing it | Useful before grants, config changes, and deletes |
| `--yes` | Auto-confirm side effects | Non-interactive runs and batch jobs |
| `--lang` | Select CLI language | Currently `zh-CN` and `en-US` |

> \[!TIP] HQL Expressions
> Commands such as `data-model`, `metric`, `measure`, and `element chart` accept [HQL (Hengshi Query Language)](https://api.hengshi.com/function_reference.html) expressions — including aggregation functions (SUM, AVG, COUNT), time functions (YEAR, MONTH, MOY, DOM), and conditional logic (IF, CASE WHEN). See the full [HQL Function Reference](https://api.hengshi.com/function_reference.html).

## Command family map

| Command family | Main scope | Continue reading |
| --- | --- | --- |
| `auth` `search` `config` `preferences` `scheduler` `logs` | authentication, search, local CLI config, system preferences, schedules, and logs | [Core & Runtime Commands](cli-reference-core.md) |
| `app` `folder` `dashboard` `element` | apps, folders, dashboards, and page elements | [App & Dashboard Commands](cli-reference-app.md) |
| `connection` `dataset` `data-model` `metric` `measure` `pipeline` `notebook` `data-alert` `data-agent` | data onboarding, modeling, metrics, execution, and AI-related capabilities | [Data & Execution Commands](cli-reference-data.md) |
| `user` `user-group` `org` `user-attr` `tenant` `subject` `kanban` `permission` `authorize` | users, orgs, tenants, permissions, subject domains, and kanban resources | [Users, Tenants & Permission Commands](cli-reference-governance.md) |

## How to keep drilling down

This reference mainly helps you decide which command tree to enter first, not reproduce every `--help` page. A simple way to think about drill-down is:

| If you need to... | Start with this command tree |
| --- | --- |
| manage app parameters, shared dimensions, rules, subscriptions, or portal settings | `app` -> `app param` / `app dimension` / `app rule` / `app subscribe` / `app portal` |
| work on dashboard plans or themes | `dashboard` -> `dashboard plan` / `dashboard theme` |
| create or update charts and page elements | `element` -> `element chart` / `element filter` / `element container` / `element text` |
| edit pipeline nodes | `pipeline` -> `pipeline edit` |

Once you have located the right command tree, use that level's `--help` in the terminal for exact flags and examples.

## Chinese aliases

The CLI still supports Chinese aliases for first-level commands, for example:

```bash
hbi 应用 list
hbi 数据集 preview
hbi 仪表盘 show
```

If your team mixes human operators and agents, it is still better to standardize on the English command tree for consistency with scripts, skills, and help output.
