Tencent Cloud CLI
$ tccli 官方出品 高风险Tencent Cloud CLI(tccli)覆盖腾讯云 API 3.0 全系服务,默认输出 JSON,支持 --filter 字段裁剪、--generate-cli-skeleton 入参模板生成、--cli-input-json 传参以及 --profile 多配置切换。
pip install tccli tccli 直接映射腾讯云 API 3.0 并支持 --generate-cli-skeleton 与 --filter,Agent 可直接调用而无需 MCP 适配层。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
默认 JSON 输出、--filter 裁剪与 --generate-cli-skeleton 沿用了类似 AWS CLI 的规范,对 Agent 十分友好。
- Supports default JSON output,
--filter, and--generate-cli-skeleton
支持 --profile 隔离与 CAM 密钥权限边界,但缺少全局统一的 --dry-run 预演参数。
- Profile isolation via
~/.tccli/and--profile
可通过 pip install tccli 或独立二进制安装,Python 打包体积略大于 Go 工具。
- PyPI
tcclipackage and GitHub binary releases
覆盖腾讯云 API 3.0 全部接口并支持 --cli-input-json 批量传参。
- Covers Tencent Cloud API 3.0 services with
--filter
腾讯云官方仓库(TencentCloud/tencentcloud-cli)持续维护。
- Official
TencentCloud/tencentcloud-cliunder Apache-2.0
支持内置 tccli <service> <action> help,但英文文档相较中文略少。
- Built-in
helpsubcommands and Tencent Cloud docs
安全边界、鉴权与放权指南
将凭证与配置保存在 ~/.tccli/(*.credential 与 *.configure),或通过 TENCENTCLOUD_SECRET_ID、TENCENTCLOUD_SECRET_KEY 和 TENCENTCLOUD_REGION 环境变量读取。
CLI 本身开源免费(Apache-2.0);调用云资源接口会产生腾讯云账单费用。
# tccli Agent Rules - Always pin `--profile` and `--region` on every `tccli` invocation. - Use `--generate-cli-skeleton` before constructing complex write payloads. - Restrict agents to read-only CAM policies when auditing resources.
Agent 高频安全命令配方
只读查询(安全推荐)
--filter 精简查询 CVM 实例列表 tccli cvm DescribeInstances --region ap-guangzhou --filter 'InstanceSet[].[InstanceId,InstanceName,InstanceState]'
默认返回 JSON,并利用 --filter 提取实例 ID、名称与状态。
tccli cvm DescribeInstances --generate-cli-skeleton
无需发起远端请求即可查看接口所需的精确 JSON 参数结构。
核心优势
- + 默认输出 JSON 并支持
--filter字段投影。 - +
--generate-cli-skeleton与--cli-input-json方便构造复杂入参。 - + 支持通过
pip install tccli快速安装。
注意事项与踩坑点
- ! 跨服务缺少统一的
--dry-run预演能力。 - ! 英文社区资料和示例相对中文文档较少。