@cap-js-community/mtx-tool

中文文档
0.14.0发布于 2026/09/03Apache-2.0构建来源已验证近 30 天下载 1874

Multitenancy and Extensibility Tool is a cli to reduce operational overhead for multitenant Cloud Foundry applications

原始使用文档
文档目录8 节
  1. Getting Started
  2. Pipelines
  3. Features
  4. Peers
  5. Documentation
  6. Support, Feedback, Contributing
  7. Code of Conduct
  8. Licensing

MTX Tool

npm version monthly downloads REUSE status Main CI

Multitenancy and Extensibility Tool is a cli to reduce operational overhead for multitenant Cloud Foundry applications, particularly in the areas user authentication, tenant registration, CAP multitenancy, and HANA container management.

Getting Started

Prerequisite is an installed CF cli v8 or newer.

Prepare

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

Use, for example

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

Pipelines

For pipelines, we recommend committing the setup configuration to your project and running MTX Tool on the pipeline runner in the corresponding directory through npx with a stable version:

In project

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

In pipeline, for example

npx @cap-js-community/[email protected] --svm-fresh-bindings all-services all-tenants
...
npx @cap-js-community/[email protected] --svm-repair-bindings all-services
...
npx @cap-js-community/[email protected] --cds-upgrade-all

Features

MTX Tool is organized into contextual sections, each with several commands.

   === 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

Adding --force to any dangerous command will override the safeguard, use at your own risk.

Peers

Documentation

Head over to our Documentation to learn more.

Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2023 SAP SE or an SAP affiliate company and mtx-tool contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

版本与发布记录

@cap-js-community/mtx-tool 共发布 37 个版本,首次发布于 2023/01/27;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.14.0latest2026/09/032 个月前
0.13.02026/07/223 个月前
0.12.02026/06/264 个月前
0.11.22026/02/178 个月前
0.11.12025/12/1010 个月前
0.11.02025/11/2411 个月前

关于 @cap-js-community/mtx-tool 的常见问题

@cap-js-community/mtx-tool 是什么?

Multitenancy and Extensibility Tool is a cli to reduce operational overhead for multitenant Cloud Foundry applications

如何安装 @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 和提交记录判断。