本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
Command Reference
本节提供了所有内容的全面参考 AWS 转换自定义 CLI 命令。
交互式命令
atx
与... 开始互动对话 AWS 转换 CLI。
atx # Start new conversation atx --resume # Resume most recent conversation atx --conversation-id <id> # Resume specific conversation atx -t # Start with all tools trusted
交互式会话命令
在交互式会话期间,可以在输入提示符处键入以下命令:
/usage-显示累积的 代理会议纪要对于当前会话
转换定义命令
atx custom def exec
在代码存储库上执行转换定义。
| Option | 长表 | 参数 | 说明 |
|---|---|---|---|
-p |
--code-repository-path |
<path> |
要转换的代码存储库的路径。对于当前目录,使用 “。” |
-c |
--build-command |
<command> |
构建存储库时要运行的命令 |
-n |
--transformation-name |
<name> |
注册表中转换定义的名称 |
-x |
--non-interactive |
- | 无需用户帮助即可运行转换 |
-t |
--trust-all-tools |
- | 信任所有工具(无工具提示) |
-d |
--do-not-learn |
- | 选择不允许从本次执行中汲取教训 |
-g |
--configuration |
<config> |
配置文件(JSON 或 YAML)或 key=value 对的路径 |
--tv |
--transformation-version |
<version> |
要使用的转换定义的版本 |
--limit |
--limit |
<limit> |
设置 代理会议纪要 |
-h |
--help |
- | 显示命令的帮助 |
atx 自定义定义列表
列出可用的转换定义。
atx custom def list atx custom def list --json # Output in JSON format
这个 类别 列显示每个转换定义是否是 analysis 或者 remediation 转型。没有类别的转换定义显示 —。在 --json 输出,该类别显示在 category 领域。如果未设置类别,则省略此字段。
atx 自定义定义获取
获取特定转换定义的详细信息。
| Option | 长表 | 参数 | 说明 |
|---|---|---|---|
-n |
--transformation-name |
<name> |
要检索的转换定义的名称 |
--tv |
--transformation-version |
<version> |
要检索的转换定义的版本 |
--td |
--target-directory |
<directory> |
保存转换定义的目标目录(默认值:“.”) |
--json |
--json |
- | 以 JSON 格式输出响应 |
-h |
--help |
- | 显示命令的帮助 |
atx 自定义定义删除
永久删除转换定义。
atx custom def delete -n <transformation-name>
atx 自定义定义发布
将转换定义发布到注册表。
| Option | 长表 | 参数 | 说明 |
|---|---|---|---|
-n |
--transformation-name |
<name> |
要发布的转换定义的名称 |
--tv |
--transformation-version |
<version> |
要使用的转换定义的版本(不适用于--description 或--source-directory) |
--sd |
--source-directory |
<directory> |
用于读取本地转换定义文件的源目录(不适用于--transformation-version) |
--description |
--description |
<description> |
转换定义的描述(不适用于--transformation-version) |
--category |
--category |
<category> |
变换定义的类别。使用 analysis 用于读取代码和报告结果的转换,或 remediation 用于更改代码的转换。如果您在发布新版本时未指定类别,则会保留先前版本的类别。不适用于--transformation-version。 |
--json |
--json |
- | 以 JSON 格式输出响应 |
-h |
--help |
- | 显示命令的帮助 |
atx custom def 保存草稿
在注册表中将转换定义保存为草稿。草稿在 30 天后过期,不会显示在注册表中。此命令返回草稿的版本号。必须使用转换名称和版本号明确执行和检索草稿。
atx custom def save-draft -n <transformation-name> --description "Description" --sd <directory>
要设置转换定义的类别,请添加 --category analysis 要么 --category remediation。
课程命令
atx 自定义定义学习
打开交互式会话,查看和管理转换定义从之前的运行中吸取的经验教训。按类别浏览课程,查看课程详情,存档、恢复或删除课程。
atx custom def learnings -n<transformation-name>
标记命令
atx 自定义 def 列表标签
列出转换定义的标签。
atx custom def list-tags --arn <transformation-arn>
atx 自定义 def 标签
向转换定义添加标签。
atx custom def tag --arn <arn> --tags '{"env":"prod","team":"backend"}'
atx custom def 取消标签
从转换定义中移除标签。
atx custom def untag --arn <arn> --tag-keys "env,team"
更新命令
atx 更新
更新 AWS 转换 CLI。
atx update # Update to latest version atx update --check # Check for updates only atx update --target-version <version> # Update to specific version
MCP 命令
atx mcp 工具
允许客户端 view/confirm 他们的 MCP 工具配置。配置的更新必须直接通过文件 ~/ 进行管理。aws/atx/mcp.json
atx mcp tools # View list of MCP servers atx mcp tools -s # List tools for the specified server