# @facets-cloud/facetsctlv3 中文文档

规范地址：https://npmcn.com/package/%40facets-cloud/facetsctlv3/

版本：1\.1\.6
npm 元数据更新时间：2026-11-12T10:13:08.563Z
中文译文更新时间：2026-11-14T08:20:01.520Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40facets-cloud/facetsctlv3
原文对照：https://npmcn.com/package/%40facets-cloud/facetsctlv3/?lang=original
项目主页：https://github.com/Facets-cloud/facetsctl
源码仓库：https://github.com/facets-cloud/facetsctl

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

- 包体积（解压后）：141 kB，44 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=12\.0\.0
- 运行依赖：17 个
- 首次发布：2024-05-31T07:04:50.009Z
- 最新版本发布：2025-07-29T09:13:31.707Z
- 近 30 天下载量：2340（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：28（近 12 个月 0 个）

## 中文简介

面额 CLI

## 安装

```sh
npm install @facets-cloud/facetsctlv3
```

也可以使用：`pnpm add @facets-cloud/facetsctlv3`、`yarn add @facets-cloud/facetsctlv3`、`bun add @facets-cloud/facetsctlv3`

## README

-   [配置](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-configuration)
-   [系统要求](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-system-requirements)
-   [使用量](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-usage)
-   [图标](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-commands)

# 配置

`facetsctl` 需要连接到所有涉及吸控者的动作。 确保您在系统运行时有嵌入器 `facetsctl` 正在运行.

# 系统要求

支持的节点版本: QQ 12.0.0

# 使用量

```sh-session
$ npm install -g @facets-cloud/facetsctlv3
$ facetsctl COMMAND
running command...
$ facetsctl (--version)
@facets-cloud/facetsctlv3/1.1.6 linux-x64 node-v20.19.4
$ facetsctl --help [COMMAND]
USAGE
  $ facetsctl COMMAND
...
```

# 图标

-   [`facetsctl artifact init`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-artifact-init)
-   [`facetsctl artifact push`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-artifact-push)
-   [`facetsctl artifact register`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-artifact-register)
-   [`facetsctl artifact upload`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-artifact-upload)
-   [`facetsctl cluster manage`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-cluster-manage)
-   [`facetsctl help [COMMAND]`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-help-command)
-   [`facetsctl login`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-login)
-   [`facetsctl release sync APPS`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-release-sync-apps)
-   [`facetsctl facetsctl release wait <apps> -p <value> -e <value> [--sync]`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-facetsctl-release-wait-apps--p-value--e-value---sync)

## `facetsctl artifact init`

初始化文物信息

```
USAGE
  $ facetsctl artifact init -p <value> -a <value> [-s <value> | -c <value>]

FLAGS
  -a, --artifactory=<value>     (required) Artifactory name
  -c, --ci-integration=<value>  CI Integration Name
  -p, --project=<value>         (required) Project name
  -s, --service=<value>         Service name

DESCRIPTION
  Initialize artifact information

EXAMPLES
  $ facetsctl artifact init --project my-project --service my-service --artifactory my-artifactory
  Created artifact-info.facets.yaml
```

_参见代码 : [src/命令/艺术/init.ts](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/artifact/init.ts)_

## `facetsctl artifact push`

将一个 Docker 图像推到配置的文物仓库

```
USAGE
  $ facetsctl artifact push -d <value>

FLAGS
  -d, --docker-image=<value>  (required) URL of the Docker image to push

DESCRIPTION
  Push a Docker image to the configured artifact repository

EXAMPLES
  $ facetsctl artifact push --docker-image my-docker-image:latest
  Successfully pushed my-docker-image:latest
```

_参见代码 : [斜弧/命令/艺术/推力](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/artifact/push.ts)_

## `facetsctl artifact register`

注册带有指定类型和值的 Docker 图像

```
USAGE
  $ facetsctl artifact register -t GIT_REF|ENVIRONMENT|RELEASE_STREAM -i <value> -v <value> [-r <value>]

FLAGS
  -i, --docker-image=<value>  (required) Docker image to register
  -r, --runId=<value>         Optional run ID to corelate to your CI system, else it will be time
  -t, --type=<option>         (required) Type (GIT_REF, ENVIRONMENT, RELEASE_STREAM)
                              <options: GIT_REF|ENVIRONMENT|RELEASE_STREAM>
  -v, --value=<value>         (required) Value of the specified type

DESCRIPTION
  Register a Docker image with a specified type and value

EXAMPLES
  $ facetsctl artifact register --type GIT_REF --docker-image my-docker-image:latest --value my-git-ref
  Successfully registered my-docker-image:latest
  Check out the registered build at: https://example.com/builds/1234
```

_参见代码 : [src/commands/艺人/注册人.ts](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/artifact/register.ts)_

## `facetsctl artifact upload`

将任意类型的应用程序构建文件上传到 Facets 控制计划

```
USAGE
  $ facetsctl artifact upload -t GIT_REF|ENVIRONMENT|RELEASE_STREAM -f <value> -v <value> [-r <value>]

FLAGS
  -f, --file-path=<value>  (required) path to the application build file (e.g., WAR, JAR, ZIP) on your local system
  -r, --runId=<value>      Optional run ID to corelate to your CI system, else it will be time
  -t, --type=<option>      (required) Type (GIT_REF, ENVIRONMENT, RELEASE_STREAM)
                           <options: GIT_REF|ENVIRONMENT|RELEASE_STREAM>
  -v, --value=<value>      (required) Value of the specified type

DESCRIPTION
  Upload any type of application build file to the Facets Control Plane

EXAMPLES
  $ facetsctl artifact upload --type GIT_REF --file-path file-to-upload --value my-git-ref
        Successfully uploaded the file file-to-upload
        Check out the registered build at: https://example.com/builds/1234
```

_参见代码 : [src/命令/艺术/上载.ts](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/artifact/upload.ts)_

## `facetsctl cluster manage`

具有高级功能的Kubernetes集群的互动管理

```
USAGE
  $ facetsctl cluster manage [-a] [-s <value>] [-r] [-d] [-v]

FLAGS
  -a, --all             Process all available clusters
  -d, --download        Download kubeconfig files for selected clusters
  -r, --refresh         Refresh kubernetes credentials for selected clusters
  -s, --search=<value>  Search for specific clusters by name, ID, or stack name
  -v, --verbose         Show detailed output and metrics

DESCRIPTION
  Interactive management of Kubernetes clusters with advanced functionality

EXAMPLES
  $ facetsctl cluster manage

  $ facetsctl cluster manage --all

  $ facetsctl cluster manage --search production

  $ facetsctl cluster manage --all --refresh

  $ facetsctl cluster manage --all --download
```

_参见代码 : [src/命令/集群/管理.ts](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/cluster/manage.ts)_

## `facetsctl help [COMMAND]`

显示侧式ctl 的帮助 .

```
USAGE
  $ facetsctl help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for facetsctl.
```

_参见代码 : [@oclif/plugin-帮助](https://github.com/oclif/plugin-help/blob/v6.0.22/src/commands/help.ts)_

## `facetsctl login`

登录到 Facets 控制平面

```
USAGE
  $ facetsctl login -u <value> -t <value> -f <value>

FLAGS
  -f, --facets-url=<value>  (required) URL of the Control plane
  -t, --token=<value>       (required) Personal token
  -u, --username=<value>    (required) Username

DESCRIPTION
  Log in to the Facets control plane

EXAMPLES
  $ facetsctl login --username my-user --token my-token --facets-url https://facets-control-plane.example.com
  Logged in successfully
```

_参见代码 : [src/命令/日志.ts](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/login.ts)_

## `facetsctl release sync APPS`

同步外同步应用程序, 使其想要的状态与部署的状态相匹配

```
USAGE
  $ facetsctl release sync APPS -p <value> -e <value>

ARGUMENTS
  APPS  List of app names to sync (comma-separated | example: ... sync app1,app2,app3 -p ...)

FLAGS
  -e, --environment=<value>  (required) Environment name
  -p, --project=<value>      (required) Project name

DESCRIPTION
  Sync out-of-sync apps to match their desired state with the deployed state
```

_参见代码 : [sc/命令/释放/同步](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/release/sync.ts)_

## `facetsctl facetsctl release wait <apps> -p <value> -e <value> [--sync]`

等待指定的应用程序的同步状态, 如果提供 -- sync 则触发同步

```
USAGE
  $ facetsctl release wait facetsctl  <apps> -p <value> -e <value> [--sync]

ARGUMENTS
  APPS  List of app names to wait for (comma-separated | example: ... sync app1,app2,app3 -p ...)

FLAGS
  -e, --environment=<value>  (required) Environment name
  -p, --project=<value>      (required) Project name
      --sync                 Trigger a sync if apps are out-of-sync

DESCRIPTION
  Wait for the sync status of the specified apps, and trigger sync if --sync is provided
```

_参见代码 : [src/命令/释放/等待.ts](https://github.com/facets-cloud/facetsctl/blob/v1.1.6/src/commands/release/wait.ts)_

-   [`facetsctl artifact init`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-artifact-init)
-   [`facetsctl artifact push`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-artifact-push)
-   [`facetsctl artifact register`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-artifact-register)
-   [`facetsctl cluster manage`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-cluster-manage)
-   [`facetsctl help [COMMAND]`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-help-command)
-   [`facetsctl login`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-login)
-   [`facetsctl release sync`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-release-sync)
-   [`facetsctl release wait`](https://npmcn.com/package/%40facets-cloud/facetsctlv3/#readme-facetsctl-release-wait)

## `facetsctl artifact init`

初始化文物信息

```
USAGE
  $ facetsctl artifact init -p <value> -s <value> -a <value>

FLAGS
  -a, --artifactory=<value>  (required) Artifactory name
  -p, --project=<value>      (required) Project name
  -s, --service=<value>      (required) Service name

DESCRIPTION
  Initialize artifact information

EXAMPLES
  $ facetsctl artifact init --project my-project --service my-service --artifactory my-artifactory
  Created artifact-info.facets.yaml
```

_参见代码 : [src/命令/艺术/init.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.0/src/commands/artifact/init.ts)_

## `facetsctl artifact push`

将一个 Docker 图像推到配置的文物仓库

```
USAGE
  $ facetsctl artifact push -d <value>

FLAGS
  -d, --docker-image=<value>  (required) URL of the Docker image to push

DESCRIPTION
  Push a Docker image to the configured artifact repository

EXAMPLES
  $ facetsctl artifact push --docker-image my-docker-image:latest
  Successfully pushed my-docker-image:latest
```

_参见代码 : [斜弧/命令/艺术/推力](https://github.com/facets-cloud/facetsctl/blob/v1.0.0/src/commands/artifact/push.ts)_

## `facetsctl artifact register`

注册带有指定类型和值的 Docker 图像

```
USAGE
  $ facetsctl artifact register -t GIT_REF|ENVIRONMENT|RELEASE_STREAM -i <value> -v <value> [-r <value>]

FLAGS
  -i, --docker-image=<value>  (required) Docker image to register
  -r, --runId=<value>         Optional run ID to corelate to your CI system, else it will be time
  -t, --type=<option>         (required) Type (GIT_REF, ENVIRONMENT, RELEASE_STREAM)
                              <options: GIT_REF|ENVIRONMENT|RELEASE_STREAM>
  -v, --value=<value>         (required) Value of the specified type

DESCRIPTION
  Register a Docker image with a specified type and value

EXAMPLES
  $ facetsctl artifact register --type GIT_REF --docker-image my-docker-image:latest --value my-git-ref
  Successfully registered my-docker-image:latest
  Check out the registered build at: https://example.com/builds/1234
```

_参见代码 : [src/commands/艺人/注册人.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.0/src/commands/artifact/register.ts)_

## `facetsctl cluster manage`

具有高级功能的Kubernetes集群的互动管理.

```
USAGE
  $ facetsctl cluster manage [-a] [-s <value>] [-r] [-d]

FLAGS
  -a, --all            Process all available clusters
  -s, --search=<value> Search for specific clusters by name, ID, or stack name
  -r, --refresh        Refresh kubernetes credentials for selected clusters
  -d, --download       Download kubeconfig files for selected clusters

DESCRIPTION
  Interactive management of Kubernetes clusters with advanced functionality.
  
  This command provides a unified interface to:
  1. List all clusters from the control plane
  2. Search for specific clusters if needed
  3. Select one or more clusters from the list
  4. Choose to either download kubeconfig files or refresh Kubernetes credentials for the selected clusters
  5. Execute operations in parallel for better performance
  
  The command handles error reporting and provides detailed status information for each operation.
  Clusters without available kubeconfig files or credentials will be reported properly without failing.

EXAMPLES
  $ facetsctl cluster manage
  $ facetsctl cluster manage --all
  $ facetsctl cluster manage --search production
  $ facetsctl cluster manage --all --refresh
  $ facetsctl cluster manage --all --download
```

_参见代码 : [src/命令/集群/管理.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.0/src/commands/cluster/manage.ts)_

## `facetsctl help [COMMAND]`

显示侧式ctl 的帮助 .

```
USAGE
  $ facetsctl help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for facetsctl.
```

_参见代码 : [@oclif/plugin-帮助](https://github.com/oclif/plugin-help/blob/v6.0.22/src/commands/help.ts)_

## `facetsctl login`

登录到 Facets 控制平面

```
USAGE
  $ facetsctl login -u <value> -t <value> -f <value>

FLAGS
  -f, --facets-url=<value>  (required) URL of the Control plane
  -t, --token=<value>       (required) Personal token
  -u, --username=<value>    (required) Username

DESCRIPTION
  Log in to the Facets control plane

EXAMPLES
  $ facetsctl login --username my-user --token my-token --facets-url https://facets-control-plane.example.com
  Logged in successfully
```

_参见代码 : [src/命令/日志.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.0/src/commands/login.ts)_

## `facetsctl release sync`

同步外同步应用程序, 使其想要的状态与部署的状态相匹配

```
USAGE
  $ facetsctl release sync <apps> -p <value> -e <value>

ARGUMENTS
  <apps>: List of app names to sync (comma-separated | example: ... sync app1,app2,app3 -p ...)

FLAGS
  -e, --environment=<value>  (required) Environment name
  -p, --project=<value>      (required) Project name

DESCRIPTION
  Sync out-of-sync apps to match their desired state with the deployed state

EXAMPLES
  $ facetsctl release sync my-resource1,my-resource2 -p my-project -e my-environment
```

_参见代码 : [sc/命令/释放/同步](https://github.com/facets-cloud/facetsctl/blob/v1.1.5/src/commands/release/sync.ts)_

## `facetsctl release wait`

等待指定的应用程序的同步状态, 如果提供 -- sync 则触发同步

```
USAGE
  $ facetsctl release wait <apps> -p <value> -e <value> [--sync]

ARGUMENTS
  <apps>: List of app names to wait for (comma-separated | example: ... sync app1,app2,app3 -p ...)

FLAGS
  -e, --environment=<value>  (required) Environment name
  -p, --project=<value>      (required) Project name
      --sync                 Trigger a sync if apps are out-of-sync

DESCRIPTION
  Wait for the sync status of the specified apps, and trigger sync if --sync is provided

EXAMPLES
  $ facetsctl release wait my-resource1,my-resource2 -p my-project -e my-environment 
  $ facetsctl release wait my-resource1,my-resource2 -p my-project -e my-environment --sync
```

_参见代码 : [src/命令/释放/等待.ts](https://github.com/facets-cloud/facetsctl/blob/v1.1.5/src/commands/release/wait.ts)_

## 常见问题

### @facets-cloud/facetsctlv3 是什么？

面额 CLI

### 如何安装 @facets-cloud/facetsctlv3？

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

### @facets-cloud/facetsctlv3 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @facets-cloud/facetsctlv3 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @facets-cloud/facetsctlv3 需要什么版本的 Node\.js？

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

### @facets-cloud/facetsctlv3 可以商用吗？

@facets-cloud/facetsctlv3 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @facets-cloud/facetsctlv3 的下载量有多少？

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

### @facets-cloud/facetsctlv3 还在维护吗？

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

