# @cap-js-community/mtx-tool 中文文档

规范地址：https://npmcn.com/package/%40cap-js-community/mtx-tool/

版本：0\.14\.0
npm 元数据更新时间：2026-09-03T12:24:18.135Z
中文译文更新时间：2026-11-09T18:44:55.985Z
软件包许可：Apache-2\.0

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

原始 npm 页面：https://www.npmjs.com/package/%40cap-js-community/mtx-tool
原文对照：https://npmcn.com/package/%40cap-js-community/mtx-tool/?lang=original
项目主页：https://cap-js-community.github.io/mtx-tool/
源码仓库：https://github.com/cap-js-community/mtx-tool

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

- 包体积（解压后）：9.4 MB，151 个文件
- TypeScript 类型：未声明
- Node.js 要求：\>=20\.0\.0
- 运行依赖：1 个
- 首次发布：2023-01-27T15:00:33.238Z
- 最新版本发布：2026-09-03T12:24:17.610Z
- 近 30 天下载量：1874（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：37（近 12 个月 6 个）

## 中文简介

多租和可扩展性工具是一种cli,用于减少多租期云创建应用程序的业务间接费用

## 安装

```sh
npm install @cap-js-community/mtx-tool
```

也可以使用：`pnpm add @cap-js-community/mtx-tool`、`yarn add @cap-js-community/mtx-tool`、`bun add @cap-js-community/mtx-tool`

## README

# MTX 工具

[![npm version](https://img.shields.io/npm/v/@cap-js-community/mtx-tool)](https://www.npmjs.com/package/@cap-js-community/mtx-tool) [![monthly downloads](https://img.shields.io/npm/dm/@cap-js-community/mtx-tool)](https://www.npmjs.com/package/@cap-js-community/mtx-tool) [![REUSE status](https://api.reuse.software/badge/github.com/cap-js-community/mtx-tool)](https://api.reuse.software/info/github.com/cap-js-community/mtx-tool) [![Main CI](https://github.com/cap-js-community/mtx-tool/actions/workflows/main-ci.yml/badge.svg)](https://github.com/cap-js-community/mtx-tool/commits/main)

多租制和多租制工具是减少多租制云层创建应用程序的业务间接费用的一种工具,特别是在用户认证、租户登记、CAP多租制和HANA集装箱管理方面.

## 开始

先决条件已安装 [CF cli 缩写](https://github.com/cloudfoundry/cli) v8或较新.

**准备**

```
npm install --global @cap-js-community/mtx-tool
mtx --setup
```

**例如使用**

```
cf target -o <my-org> -s <my-space>
mtx regl
mtx hdil
```

## 管道

关于输油管,我们建议将配置用于您的项目,并在输油管上运行MTX工具 在相应的目录中通过 npx 运行, 且版本稳定 :

**在项目中**

```
mtx --setup-local
git add . && git commit -m "mtx-tool config"
```

**例如,在编审中**

```
npx @cap-js-community/mtx-tool@0.14.0 --svm-fresh-bindings all-services all-tenants
...
npx @cap-js-community/mtx-tool@0.14.0 --svm-repair-bindings all-services
...
npx @cap-js-community/mtx-tool@0.14.0 --cds-upgrade-all
```

## 特征

MTX工具被组织成上下文部分,每个部分都有多个命令.

```
   === user authentication (uaa) ===
~  uaad   --uaa-decode TOKEN                                     decode JSON web token
~  uaac   --uaa-client [TENANT]                                  obtain uaa token for generic client
~  uaap   --uaa-passcode PASSCODE [TENANT]                       obtain uaa token for one-time passcode
~  uaau   --uaa-user USERNAME PASSWORD [TENANT]                  obtain uaa token for username password
~  uaasc  --uaa-service-client SERVICE [TENANT]                  obtain service token for generic client
~  uaasp  --uaa-service-passcode SERVICE PASSCODE [TENANT]       obtain service token for one-time passcode
~  uaasu  --uaa-service-user SERVICE USERNAME PASSWORD [TENANT]  obtain service token for username password
          ...    [TENANT]                                        obtain token for tenant, fallback to paas tenant
          ...    --json                                          output in json
          ...    --decode                                        decode result token
          ...    --userinfo                                      add detailed user info for passcode or username

   === tenant registry (reg) ===
~  regl   --registry-list [TENANT]                      list all subscribed subaccount names
~  regll  --registry-long-list [TENANT]                 long list all subscribed subaccounts
~  regs   --registry-service-config                     show registry service config
          --registry-update TENANT_ID                   update tenant dependencies
          --registry-update-all                         update dependencies for all subscribed tenants
          --registry-update-url [TENANT_ID]             update all subscribed application URL
*         --registry-migrate TENANT_ID                  migrate tenant to subscription manager
*         --registry-offboard TENANT_ID                 offboard tenant subscription
*         --registry-offboard-skip TENANT_ID SKIP_APPS  offboard tenant subscription skipping apps
          ...    [TENANT]                               filter list for tenant id or subdomain
          ...    --json                                 list in json
          ...    --time                                 list includes timestamps
          ...    --skip-unchanged                       skip update for unchanged dependencies
          ...    --only-stale                           only update subscriptions that have not changed today
          ...    --only-failed                          only update subscriptions with UPDATE_FAILED state

   === cap multitenancy (cds) ===
~  cdsl   --cds-list [TENANT]                        list all cds-mtx tenant names
~  cdsll  --cds-long-list [TENANT]                   long list all cds-mtx tenants
   cdsot  --cds-onboard-tenant TENANT_ID [METADATA]  onboard specific tenant
   cdsut  --cds-upgrade-tenant TENANT_ID             upgrade specific tenant
   cdsua  --cds-upgrade-all                          upgrade all tenants
*         --cds-offboard-tenant TENANT_ID            offboard specific tenant
*         --cds-offboard-all                         offboard all tenants
          ...    [METADATA]                          onboard subscription metadata
          ...    [TENANT]                            filter list for tenant id or subdomain
          ...    --json                              list in json
          ...    --time                              list includes timestamps
          ...    --auto-undeploy                     upgrade with auto undeploy
          ...    --first-instance                    upgrade only through first app instance

   === hana management (hdi) ===
~  hdil   --hdi-list [TENANT_ID]         list all hdi container instances
~  hdill  --hdi-long-list [TENANT_ID]    long list all hdi container instances and bindings
~  hditt  --hdi-tunnel-tenant TENANT_ID  open ssh tunnel to tenant db
          ...    [TENANT_ID]             filter for tenant id
          ...    --json                  list in json
          ...    --time                  list includes timestamps
          ...    --reveal                show sensitive information

   === service manager (svm) ===
~  svml   --svm-list [TENANT_ID]                                      list all service instances and bindings
~  svmll  --svm-long-list [TENANT_ID]                                 long list all service instances and bindings
          --svm-make-bindings-single SERVICE_PLAN TENANT_ID [PARAMS]  make service bindings 1-to-1
          --svm-make-bindings-double SERVICE_PLAN TENANT_ID [PARAMS]  make service bindings 1-to-2
          --svm-restart                                               rolling restart for svm bound apps
          --svm-restart-skip SKIP_APPS                                rolling restart skipping apps
*         --svm-delete-bindings SERVICE_PLAN TENANT_ID                delete service bindings
*         --svm-delete SERVICE_PLAN TENANT_ID                         delete service instances and bindings
          ...    SERVICE_PLAN                                         filter for service plan with "offering:plan"
                                                                        or "all-services" for all
          ...    TENANT_ID                                            filter for tenant id or "all-tenants" for all
          ...    SKIP_APPS                                            comma-separated app names to skip
          ...    [PARAMS]                                             create binding with custom parameters
          ...    --json                                               list in json
          ...    --time                                               list includes timestamps
          ...    --reveal                                             show sensitive information

   === server diagnostic (srv) ===
~  srvenv  --server-env [APP_NAME]                            dump system environment
~  srvcrt  --server-certificates [APP_NAME] [APP_INSTANCE]    dump instance certificates
   srvd    --server-debug [APP_NAME] [APP_INSTANCE]           open ssh tunnel to debug port
           ...    [APP_NAME]                                  run server commands for a specific app
           ...    [APP_INSTANCE]                              tunnel to specific app instance, fallback to 0

~  are read-only commands
*  are potentially _dangerous_ commands
```

添加中 `--force` 对任意 _危险_ 命令将覆盖防护系统,并冒着风险使用.

## 同伴

-   [SAP BTP 命令行接口](https://help.sap.com/docs/btp/btp-cli-command-reference/btp-cli-command-reference), (中文(简体) ), [下载](https://tools.hana.ondemand.com/#cloud-btpcli)
-   [服务管理器控制命令行工具](https://github.com/Peripli/service-manager-cli),将存档于2025年8月

## 文档

去我们家 [文档](https://cap-js-community.github.io/mtx-tool/) 学习更多.

## 支持、反馈、贡献

此项目可通过下列方式对特性请求/建议、错误报告等开放: [GitHub 问题](https://github.com/cap-js-community/mtx-tool/issues)鼓励并始终欢迎各方作出贡献和反馈。 关于如何作出贡献的更多信息,项目结构以及额外贡献信息见我们 [贡献准则](https://npmcn.com/package/%40cap-js-community/mtx-tool/CONTRIBUTING.md)。 。 。 .

## 行为守则

作为成员、贡献者和领导人,我们保证使参加我们的社区成为每个人不受骚扰的经历。 通过参与这个项目,你同意遵守 [行为守则](https://npmcn.com/package/%40cap-js-community/mtx-tool/CODE_OF_CONDUCT.md) 在任何时间.

## 许可证发放

版权2023 SAP SE或SAP附属公司和Mtx工具贡献者. 请看我们的 [自由主义](https://npmcn.com/package/%40cap-js-community/mtx-tool/LICENSE) 版权和许可证信息。 详细信息,包括第三方组成部分及其许可证/版权信息 [通过REUSE工具](https://api.reuse.software/info/github.com/cap-js-community/mtx-tool)。 。 。 .

## 常见问题

### @cap-js-community/mtx-tool 是什么？

多租和可扩展性工具是一种cli,用于减少多租期云创建应用程序的业务间接费用

### 如何安装 @cap-js-community/mtx-tool？

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

### @cap-js-community/mtx-tool 支持 TypeScript 吗？

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

### @cap-js-community/mtx-tool 需要什么版本的 Node\.js？

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

### @cap-js-community/mtx-tool 可以商用吗？

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

### @cap-js-community/mtx-tool 的下载量有多少？

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

### @cap-js-community/mtx-tool 还在维护吗？

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

