dx-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DX CLI

DX CLI

Use the
dx
CLI to manage your organization's Software Catalog, Scorecards, and Engineering data from the command line. All commands communicate with the DX web API and require authentication.
使用
dx
CLI从命令行管理组织的软件目录、评分卡和工程数据。所有命令均与DX Web API通信,且需要身份验证。

Getting Help

获取帮助

Run
dx --help
to see all top-level commands. Run
dx <subcommand> --help
to see usage for any command:
dx --help
dx auth --help
dx catalog --help
dx catalog entities --help
dx catalog entityTypes --help
dx scorecards --help
dx studio --help
All commands accept
--json
to return machine-readable JSON instead of human-readable output.
运行
dx --help
查看所有顶级命令。运行
dx <子命令> --help
查看任意命令的使用方法:
dx --help
dx auth --help
dx catalog --help
dx catalog entities --help
dx catalog entityTypes --help
dx scorecards --help
dx studio --help
所有命令均支持
--json
参数,以返回机器可读的JSON格式,而非人类可读的输出。

Authentication

身份验证

Before using any command, verify that you are authenticated:
dx auth status
If this returns an error or shows that you are not logged in, stop and ask the user to run:
dx auth login --token <token>
Tokens are DX web API tokens. They are scoped per DX instance base URL and stored locally.
使用任何命令之前,请验证您已完成身份验证:
dx auth status
如果返回错误或显示未登录,请停止操作并让用户运行:
dx auth login --token <token>
令牌为DX Web API令牌,其作用域基于DX实例的基础URL,并存储在本地。

Glossary

术语表

Software Catalog terms

软件目录术语

Entity — A record in the Software Catalog representing a service, team, library, or any other thing tracked by your organization. Each entity has an
identifier
(a unique slug), a
type
, optional
name
,
description
,
owner_teams
,
owner_users
, and a map of typed
properties
.
Entity Type — The schema for a category of entities (e.g.
service
,
library
). An entity type defines which
properties
and
aliases
entities of that type carry.
Property — A typed field defined on an entity type. Properties have identifiers and types such as
text
,
number
,
boolean
,
select
,
multi_select
,
url
,
date
,
user
,
list
,
json
, and others. When setting properties with
--property
, use
key=value
syntax; for
multi_select
and
list
types, values are comma-separated.
Alias — An alternative identifier that maps external system references (e.g. a GitHub repo slug) to an entity.
实体(Entity) — 软件目录中的一条记录,代表组织追踪的服务、团队、库或其他任何对象。每个实体拥有一个
identifier
(唯一短标识)、一个
type
、可选的
name
description
owner_teams
owner_users
,以及一个类型化的
properties
映射。
实体类型(Entity Type) — 某一类实体的架构(例如
service
library
)。实体类型定义了该类型实体可携带的
properties
aliases
属性(Property) — 定义在实体类型上的类型化字段。属性拥有标识和类型,例如
text
number
boolean
select
multi_select
url
date
user
list
json
等。使用
--property
设置属性时,采用
key=value
语法;对于
multi_select
list
类型,值以逗号分隔。
别名(Alias) — 替代标识,用于将外部系统引用(例如GitHub仓库短标识)映射到实体。

Scorecards terms

评分卡术语

Scorecard — A health-tracking framework that evaluates entities against a set of checks. Scorecards are either
LEVEL
-based (entities are ranked across named levels like Bronze/Silver/Gold) or
POINTS
-based (entities accumulate points from checks). To see how a specific entity is currently performing across all scorecards, use
dx catalog entities scorecards <identifier>
.
Check — A single SQL-based rule inside a scorecard. The SQL query returns a
status
column (
PASS
,
WARN
, or
FAIL
) for each entity.
Initiative — A time-boxed project that groups failing scorecard checks into actionable tasks for teams. Tasks for a given entity can be fetched with
dx catalog entities tasks <identifier>
.
评分卡(Scorecard) — 一种健康追踪框架,通过一系列检查来评估实体。评分卡分为基于
LEVEL
(实体按青铜/白银/黄金等命名等级排名)或基于
POINTS
(实体通过检查累积分数)两种类型。要查看特定实体在所有评分卡中的当前表现,可使用
dx catalog entities scorecards <identifier>
命令。
检查(Check) — 评分卡内的一条基于SQL的规则。SQL查询会为每个实体返回一个
status
列(值为
PASS
WARN
FAIL
)。
行动计划(Initiative) — 有时间限制的项目,将评分卡中未通过的检查分组为团队可执行的任务。可使用
dx catalog entities tasks <identifier>
命令获取特定实体的任务。

Reference Docs

参考文档

  • Catalog management — Entities and entity types: listing, inspecting, creating, updating, and deleting.
  • Scorecards management — Scorecards and checks: listing, inspecting, creating, updating, and deleting via YAML.
  • 目录管理 — 实体与实体类型:列出、查看、创建、更新和删除。
  • 评分卡管理 — 评分卡与检查:通过YAML进行列出、查看、创建、更新和删除。