# @commercecloudintegrations/epx-cli 中文文档

规范地址：https://npmcn.com/package/%40commercecloudintegrations/epx-cli/

版本：0\.3\.0
npm 元数据更新时间：2026-11-05T22:03:21.163Z
中文译文更新时间：2026-11-10T11:57:31.930Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40commercecloudintegrations/epx-cli
原文对照：https://npmcn.com/package/%40commercecloudintegrations/epx-cli/?lang=original
项目主页：https://commerce-cloud-integrations.github.io/emporix-cli/
源码仓库：https://github.com/commerce-cloud-integrations/emporix-cli

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1 MB，61 个文件
- TypeScript 类型：未声明
- Node.js 要求：\>=18
- 运行依赖：0 个
- 首次发布：2026-10-22T07:50:18.568Z
- 最新版本发布：2026-11-05T22:03:20.751Z
- 近 30 天下载量：3971（2026-10-11 至 2026-11-09，npm 官方下载统计）
- 已发布版本数：29（近 12 个月 29 个）

## 中文简介

epx, Emporix Commerce API 的命令行客户端

## 安装

```sh
npm install @commercecloudintegrations/epx-cli
```

也可以使用：`pnpm add @commercecloudintegrations/epx-cli`、`yarn add @commercecloudintegrations/epx-cli`、`bun add @commercecloudintegrations/epx-cli`

## README

# epx 数据

[![Release](https://img.shields.io/github/v/release/commerce-cloud-integrations/emporix-cli?sort=semver)](https://github.com/commerce-cloud-integrations/emporix-cli/releases/latest) [![npm](https://img.shields.io/npm/v/@commercecloudintegrations/epx-cli?logo=npm)](https://www.npmjs.com/package/@commercecloudintegrations/epx-cli) [![Quality gate status](https://sonarcloud.io/api/project_badges/measure?project=commerce-cloud-integrations_emporix-cli&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=commerce-cloud-integrations_emporix-cli) [![Go](https://img.shields.io/badge/go-1.27.3%2B-00ADD8?logo=go&logoColor=white)](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/go.mod) [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/LICENSE) [![Documentation](https://img.shields.io/badge/docs-epx-4F46E5)](https://commerce-cloud-integrations.github.io/emporix-cli/)

epx 是命令行客户端 [Emporix 商业 APIs](https://developer.emporix.io/api-references)。 。 。 . 它能帮助你读取,脚本, 并改变一个Emporix租户的数据 从终端右.

**联合国** [(原始内容存档于2018-09-26) (英语). commercial-cloud-institutions.github.io/emporix-cli](https://commerce-cloud-integrations.github.io/emporix-cli/) 覆盖安装,认证,每个命令,以及Emporix API覆盖.

**有了Epx,你可以:**

-   阅读产品、类别、目录、价格、可用性、客户、订单和近乎 其它 Emporix 资源作为表格,CSV,JSON,YAML,或JSON Lines.
-   过滤、排序和页面通过任何列表而不写入呼号代码 .
-   安全更改数据: 每封信都用 `--dry-run` 问之前 它发出.
-   调用任意 Emporix API 端点 `epx api`,只使用您命名的 OAuth 瞄准镜.
-   以稳定的输出和退出代码可靠地显示缺失项目 范围.

[![epx demo](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/site/images/demo.gif)](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/site/images/demo.webm)

> epx是一个非官方的项目. 它不隶属于Emporix或得到其认可.

## 安装

epx是一个用于macOS,Linux和Windows的单二进制,运行于x64 (amd64)和arm64上.

### 安装脚本

在 macOS 或 Linux 上:

```sh
curl -fsSL https://github.com/commerce-cloud-integrations/emporix-cli/releases/latest/download/install.sh | sh
```

在 Windows( PowerShell) 上:

```powershell
powershell -ExecutionPolicy ByPass -c "irm https://github.com/commerce-cloud-integrations/emporix-cli/releases/latest/download/install.ps1 | iex"
```

剧本下载您平台的最新版本, 对照该版本的 校验和安装 `epx` 输入 `~/.local/bin` (关于窗口) `%LOCALAPPDATA%\Programs\epx\bin`(中文(简体) ) ,将目录添加到您的 `PATH` 如果需要的话。 在macOS和Linux上,它安装 男人的页面进入 `~/.local/share/man/man1`设置 `EPX_VERSION` (例如: `v0.3.0`锁定一个释放, `EPX_INSTALL_DIR` 改为 选择目录,或 `EPX_NO_MODIFY_PATH=1` 留下你的外壳简介.

### 土生土长

在 macOS 或 Linux 上:

```sh
brew install commerce-cloud-integrations/tap/epx
```

Homebrew安装了二进制, 人页和外壳完成为bash, zsh和鱼.

### 转弯

在 Windows 上, 在 PowerShell 中:

```powershell
scoop bucket add commerce-cloud-integrations https://github.com/commerce-cloud-integrations/scoop-bucket
scoop install commerce-cloud-integrations/epx
```

### 无

与节点.js 18或后:

```sh
npm install --global @commercecloudintegrations/epx-cli
```

npm 只安装您的平台的二进制 。 没有编译和安装脚本 运行。 在不安装的情况下运行 epx 一次 :

```sh
npx @commercecloudintegrations/epx-cli version
```

### 释放归档

每个 [释放](https://github.com/commerce-cloud-integrations/emporix-cli/releases) 持有 每个平台存档和一个校验和文件。 例如,在 Linux x64 上:

```sh
version=v0.3.0
base=https://github.com/commerce-cloud-integrations/emporix-cli/releases/download/$version
curl -fsSLO "$base/epx_${version}_linux_amd64.tar.gz" &&
  curl -fsSLO "$base/epx_${version}_checksums.txt" &&
  sha256sum --check --ignore-missing "epx_${version}_checksums.txt" &&
  tar -xzf "epx_${version}_linux_amd64.tar.gz" &&
  sudo install "epx_${version}_linux_amd64/epx" /usr/local/bin/epx
```

在macOS上,使用 `shasum -a 256 --check --ignore-missing` 改为 `sha256sum`。 。 。 .

### 走开

与去1.27.3或后:

```sh
go install github.com/commerce-cloud-integrations/emporix-cli/cmd/epx@latest
```

### 从源

```sh
git clone https://github.com/commerce-cloud-integrations/emporix-cli.git
cd emporix-cli
go build -o bin/epx ./cmd/epx
```

## 升级

| 安装于 | 升级 |
| --- | --- |
| 土生土长 | `brew upgrade epx` |
| 转弯 | `scoop update epx` |
| 无 | `npm update --global @commercecloudintegrations/epx-cli` |
| 安装脚本 | 再运行剧本. |
| 释放归档 | 将二进制替换为新发行的一出. |
| 走开 | 运行 `go install` 再来一次. |

## 未加载

1.  如果您使用配置文件,请用 `epx profile remove NAME`,其中也删除 它的客户端从OS密钥链的秘密.
2.  删除 epx : `brew uninstall epx`, (中文(简体) ), `scoop uninstall epx` 或者说 `npm uninstall --global @commercecloudintegrations/epx-cli`,或删除 `epx` 安装的二进制 .
3.  删除 `epx` 配置目录中的文件夹 : `~/.config` 在Linux上, `~/Library/Application Support` 在macOS上, `%AppData%` 在视窗上.

## 开始

由 Emporix API 键认证 。 创建一个仅包含范围 命令,然后通过环境将其交给 epx:

```sh
export EMPORIX_TENANT=acme1
export EMPORIX_CLIENT_ID=...
export EMPORIX_CLIENT_SECRET=...
```

或者把它保存在档案里, 其客户端的秘密到OS键链:

```sh
epx profile add dev --tenant acme1 --client-id ... --site AcmeStore_NL   # asks for the secret
```

然后让你的第一个读到:

```sh
epx auth status --scope product.product_read_unpublished    # check the key and its scopes
epx sites list
epx products list --query published:false --sort code:desc --limit 20
epx products get 100200 -o json
epx api get '/catalog/{tenant}/catalogs'                     # any endpoint
```

并在发送前预览一则信件:

```sh
epx units create --file gram.json --dry-run    # print the exact request
epx units create --file gram.json              # send it after you confirm
```

## 使用量

```sh
epx [command]

# Run `--help` for detailed information about a command, its flags, and its scopes
epx [command] --help

# Or read the manual: epx, and each top-level command (installed by Homebrew, the script and npm)
man epx
man epx-products
```

## 图标

每个命令的帮助都指定它所要求的 OAuth 范围 。 这个 [CLI 参考](https://commerce-cloud-integrations.github.io/emporix-cli/commands) 文档 所有命令和旗帜.

| 区域 | 图标 |
| --- | --- |
| 产品和目录 | [`products`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/products), (中文(简体) ), [`categories`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/categories), (中文(简体) ), [`category-trees`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/category-trees), (中文(简体) ), [`catalogs`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/catalogs), (中文(简体) ), [`brands`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/brands), (中文(简体) ), [`labels`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/labels), (中文(简体) ), [`media`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/media), (中文(简体) ), [`product-templates`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/product-templates), (中文(简体) ), [`units`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/units) |
| 价格和晋升 | [`prices`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/prices), (中文(简体) ), [`price-lists`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/price-lists), (中文(简体) ), [`price-models`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/price-models), (中文(简体) ), [`fees`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/fees), (中文(简体) ), [`taxes`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/taxes), (中文(简体) ), [`currencies`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/currencies), (中文(简体) ), [`exchange-rates`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/exchange-rates), (中文(简体) ), [`coupons`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/coupons), (中文(简体) ), [`reward-points`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/reward-points) |
| 库存和航运 | [`availability`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/availability), (中文(简体) ), [`shipping`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/shipping), (中文(简体) ), [`delivery-times`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/delivery-times) |
| 客户和B2B | [`customers`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/customers), (中文(简体) ), [`segments`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/segments), (中文(简体) ), [`legal-entities`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/legal-entities), (中文(简体) ), [`customer-locations`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/customer-locations), (中文(简体) ), [`contact-assignments`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/contact-assignments), (中文(简体) ), [`shopping-lists`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/shopping-lists) |
| 订单和离职 | [`carts`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/carts), (中文(简体) ), [`quotes`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/quotes), (中文(简体) ), [`orders`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/orders), (中文(简体) ), [`returns`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/returns), (中文(简体) ), [`invoice-jobs`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/invoice-jobs), (中文(简体) ), [`payment-modes`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/payment-modes), (中文(简体) ), [`payment-transactions`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/payment-transactions) |
| 供应商 | [`vendors`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/vendors), (中文(简体) ), [`vendor-locations`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/vendor-locations) |
| 租户设置 | [`sites`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/sites), (中文(简体) ), [`countries`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/countries), (中文(简体) ), [`regions`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/regions), (中文(简体) ), [`configurations`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/configurations), (中文(简体) ), [`iam`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/iam), (中文(简体) ), [`webhooks`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/webhooks), (中文(简体) ), [`schemas`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/schemas), (中文(简体) ), [`custom-entities`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/custom-entities), (中文(简体) ), [`sequential-ids`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/sequential-ids), (中文(简体) ), [`session-contexts`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/session-contexts), (中文(简体) ), [`imports`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/imports), (中文(简体) ), [`changelog`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/changelog) |
| 搜索和人工智能 | [`search`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/search), (中文(简体) ), [`indexing`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/indexing), (中文(简体) ), [`ai`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/ai) |
| 任何终点 | [`api get|post|put|patch|delete`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/api) |
| epx 本身 | [`auth`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/auth), (中文(简体) ), [`profile`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/profile), (中文(简体) ), [`completion`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/completion), (中文(简体) ), [`version`](https://commerce-cloud-integrations.github.io/emporix-cli/commands/version) |

## 安全问题

-   **读取不改变**,包括Emporix担任POST或PUT的,例如: 搜索和运输引文.
-   **写作清晰.** 每个字都显示了它的确切要求 `--dry-run`,在 它发送(仅在输入它删除的内容时删除),需要 `--yes` 在脚本中,并且 一旦它到达Emporix,就再也没有发送过.
-   **起码的特权.** 每个命令都要求一个只具有其所需范围的信使,以及 当您的 API 密钥缺少一个时, 退出代码 3 失败, 而不是默默返回更少 数据。 需要可写入范围的读取器 `--allow-write-scope`。 。 。 .
-   **全权证书保密.** epx从环境或剖面读取其 API 密钥, 永远不要从旗帜, 也不要打印它的标志或客户秘密.
-   **一个主机,只有HTTPS.** 请求只到配置的 API 主机, 超越 HTTPS( Plain HTTP) 只有回回地址,如本地测试服务器),而再定向则从未被跟踪.

`-o json` 财务报告和审定财务报表 `-o yaml` emporix发送时打印答复,包括机密。 见 [安保模式](https://commerce-cloud-integrations.github.io/emporix-cli/security)。 。 。 .

## 退出代码

| 代码 | 含义 |
| --- | --- |
| `0` | 成绩 |
| `1` | 错误 |
| `2` | 无效的使用或配置; 无发送 |
| `3` | 认证失败或缺少范围 |
| `4` | 未找到 |
| `5` | 相冲突:项目自阅读后已更改, 已经存在, 或无法接受当前状态的变化; 错误表示下一步要做什么 |

## 文档

这个 [epx 文档](https://commerce-cloud-integrations.github.io/emporix-cli/) 覆盖 安装、认证、输出格式、列表、书写、脚本和 [Emporix API 覆盖](https://commerce-cloud-integrations.github.io/emporix-cli/coverage) 联 合 国 每一个命令. [职责. md](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/COMPATIBILITY.md) 列出 Emporix API 操作 epx 发送,每个参考版本.

## 发展

epx 以 Go 写 [眼镜蛇](https://github.com/spf13/cobra)。 。 。 .

```sh
go build -o bin/epx ./cmd/epx
go test ./...    # API calls go to local fake servers; no credentials needed
```

除了眼镜蛇之外,Epx还取决于 [键盘](https://github.com/zalando/go-keyring) 联 合 国 oS 密钥链中的客户端密钥( 无 cgo), 以及 [x/ 任期](https://pkg.go.dev/golang.org/x/term) 财务报告和审定财务报表 [x/ sys 类型](https://pkg.go.dev/golang.org/x/sys) 在不显示的情况下读取一个秘密,并在Windows上锁定配置文件.

见 [捐款额](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/CONTRIBUTING.md) 报告错误或发送更改, [警卫](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/SECURITY.md) 报告脆弱性,以及 [变动情况](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/CHANGELOG.md) 联 合 国 每个版本的更改.

## 许可证

凭 [Apache 许可证 2.0](https://npmcn.com/package/%40commercecloudintegrations/epx-cli/LICENSE)。 。 。 .

epx 由下列设备维护: [商业云集](https://www.commercecloudintegrations.com/)。 。 。 .

## 常见问题

### @commercecloudintegrations/epx-cli 是什么？

epx, Emporix Commerce API 的命令行客户端

### 如何安装 @commercecloudintegrations/epx-cli？

在项目目录运行 npm install @commercecloudintegrations/epx-cli，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 epx，可以用 npx epx 直接运行。

### @commercecloudintegrations/epx-cli 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/commercecloudintegrations\_\_epx-cli 是否存在。

### @commercecloudintegrations/epx-cli 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=18。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @commercecloudintegrations/epx-cli 可以商用吗？

@commercecloudintegrations/epx-cli 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @commercecloudintegrations/epx-cli 的下载量有多少？

根据 npm 官方下载统计，@commercecloudintegrations/epx-cli 在 2026/10/11 – 2026/11/09 这 30 天内被下载 3,971 次，日均约 132 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @commercecloudintegrations/epx-cli 还在维护吗？

最新版本 0\.3\.0 发布于 2026/11/06（4 天前）；至今共发布 29 个版本，其中过去 12 个月发布了 29 个；首次发布于 2026/10/22。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

