Install
openclaw skills install @fengyucn/ctyun天翼云CLI工具 - 企业级命令行工具,帮助您轻松管理天翼云资源。支持ECS、VPC、EBS、ELB、CCE、Redis、Kafka、CSS、EMR、监控、账务、IAM、Aone、CloudPC、AIServer、Audit、IMS、LTS、SFS、OceanFS、ZOS、DPS物理机等26+服务模块,覆盖510+个API,478+个命令。
openclaw skills install @fengyucn/ctyun天翼云 CLI 工具,功能强大的企业级命令行工具,帮助您轻松管理天翼云资源。支持云服务器(ECS)、监控告警、安全防护、Redis分布式缓存、弹性负载均衡(ELB)、容器引擎(CCE)、VPC网络、费用查询等核心功能。
规模统计: 55,000+行代码,510+个API,478+个命令,26+大服务模块
pip install ctyun-cli
pipx install ctyun-cli
git clone https://github.com/fengyucn/ctyun-cli.git
cd ctyun-cli
pip install -e .
ctyun-cli --version
ctyun-cli --help
export CTYUN_ACCESS_KEY=your_access_key
export CTYUN_SECRET_KEY=your_secret_key
将上述命令添加到 ~/.bashrc 或 ~/.zshrc 以实现永久配置。
ctyun-cli configure --access-key YOUR_ACCESS_KEY --secret-key YOUR_SECRET_KEY --region cn-north-1
ctyun-cli show-config
ctyun-cli list-profiles
ctyun-cli test
所有命令都支持以下全局选项:
--profile TEXT: 指定配置文件名称--access-key TEXT: 访问密钥--secret-key TEXT: 密钥--region TEXT: 区域--endpoint TEXT: API 端点--output [table|json|yaml]: 输出格式(默认 table)--debug: 启用调试模式ctyun-cli ecs list
ctyun-cli ecs list --region cn-north-1 --output json
ctyun-cli ecs detail --instance-id YOUR_INSTANCE_ID
ctyun-cli ecs multidetail --instance-ids ID1,ID2,ID3
ctyun-cli ecs statistics
ctyun-cli ecs regions
ctyun-cli ecs query-price --flavor-id FLAVOR_ID --quantity 1
ctyun-cli ecs renew-price --region-id REGION_ID --resource-type VM --resource-uuid RESOURCE_UUID --cycle-type MONTH --cycle-count 1
ctyun-cli vpc list
ctyun-cli vpc new-list
ctyun-cli vpc show --vpc-id YOUR_VPC_ID
ctyun-cli vpc subnet --vpc-id YOUR_VPC_ID
ctyun-cli vpc security --vpc-id YOUR_VPC_ID
ctyun-cli vpc route-table --vpc-id YOUR_VPC_ID
ctyun-cli vpc eip
ctyun-cli vpc nat-gateway
ctyun-cli vpc peering
ctyun-cli vpc flow-log
ctyun-cli ebs list
ctyun-cli ebs list --region cn-north-1 --output json
ctyun-cli elb loadbalancer --help
ctyun-cli elb loadbalancer list
ctyun-cli elb listener --help
ctyun-cli elb targetgroup --help
ctyun-cli elb health-check --help
ctyun-cli elb monitor --help
# 创建询价
ctyun-cli elb pgelb-create-price --region-id REGION_ID --subnet-id SUBNET_ID --name my-elb --sla-name elb.s2.small --resource-type internal --cycle-type month --cycle-count 1
# 续订询价
ctyun-cli elb pgelb-renew-price --region-id REGION_ID --elb-id ELB_ID --cycle-type month --cycle-count 1
# 变配询价
ctyun-cli elb pgelb-modify-price --region-id REGION_ID --elb-id ELB_ID --sla-name elb.s3.small
ctyun-cli cce list-clusters
ctyun-cli cce describe-cluster --cluster-id YOUR_CLUSTER_ID
ctyun-cli cce get-kubeconfig --cluster-id YOUR_CLUSTER_ID
ctyun-cli cce list-nodes --cluster-id YOUR_CLUSTER_ID
ctyun-cli cce get-node-detail --cluster-id CLUSTER_ID --node-id NODE_ID
ctyun-cli cce list-pods --cluster-id CLUSTER_ID
ctyun-cli cce list-deployments --cluster-id CLUSTER_ID
ctyun-cli cce list-services --cluster-id CLUSTER_ID
ctyun-cli cce logs --help
ctyun-cli cce nodepool --help
ctyun-cli cce autoscaling --help
ctyun-cli cce configmap --help
ctyun-cli cce tag --help
# 列出命名空间
ctyun-cli cce namespace list --cluster-id CLUSTER_ID --region-id REGION_ID
# 查询命名空间详情
ctyun-cli cce namespace show --cluster-id CLUSTER_ID --namespace-name default --region-id REGION_ID
# 创建命名空间
ctyun-cli cce namespace create --cluster-id CLUSTER_ID --region-id REGION_ID --namespace-yaml "apiVersion: v1
kind: Namespace
metadata:
name: my-namespace"
# 更新命名空间
ctyun-cli cce namespace update --cluster-id CLUSTER_ID --namespace-name my-namespace --region-id REGION_ID --namespace-yaml "apiVersion: v1
kind: Namespace
metadata:
name: my-namespace
labels:
env: production"
# 删除命名空间
ctyun-cli cce namespace delete --cluster-id CLUSTER_ID --namespace-name my-namespace --region-id REGION_ID
ctyun-cli redis list
ctyun-cli redis describe --instance-id YOUR_INSTANCE_ID
ctyun-cli redis describe -i YOUR_INSTANCE_ID -f table
ctyun-cli redis network --instance-id YOUR_INSTANCE_ID
ctyun-cli redis network -i YOUR_INSTANCE_ID --region-id RESOURCE_POOL_ID
ctyun-cli redis topology --instance-id YOUR_INSTANCE_ID
ctyun-cli redis cluster-nodes
ctyun-cli redis cluster-nodes --page 1 --size 20
ctyun-cli redis create-instance --help
ctyun-cli redis zones
ctyun-cli redis engine-version --instance-id INSTANCE_ID
ctyun-cli redis instance-version --instance-id INSTANCE_ID
ctyun-cli redis monitor-history --instance-id INSTANCE_ID
ctyun-cli redis diagnose --instance-id INSTANCE_ID
ctyun-cli redis clients --instance-id INSTANCE_ID
ctyun-cli redis node-list --prod-inst-id INSTANCE_ID --region-id REGION_ID
ctyun-cli redis log-download --prod-inst-id INSTANCE_ID --node-name NODE_NAME --date 2026-06-23
ctyun-cli redis replication-state --prod-inst-id INSTANCE_ID --fragment-name redis-0
ctyun-cli redis labels --region-id REGION_ID
ctyun-cli redis labels -r REGION_ID --label-key APPNAME
ctyun-cli redis running-logs --prod-inst-id INSTANCE_ID --node-name NODE_NAME
ctyun-cli redis accounts --prod-inst-id INSTANCE_ID
# 订购询价
ctyun-cli redis price --order-type BUY --charge-type PrePaid --period 1 --edition DirectCluster --shard-mem-size 1 --shard-count 3 --engine-version 6.0 --capacity 3
# 变配询价
ctyun-cli redis price --order-type EXPANSION --prod-inst-id INSTANCE_ID
ctyun-cli monitor list
ctyun-cli monitor query-alarm-rules
ctyun-cli monitor query-alert-history
ctyun-cli monitor query-resource-groups
ctyun-cli monitor query-custom-trend
ctyun-cli monitor cpu-top
ctyun-cli monitor mem-top
ctyun-cli monitor disk-top
ctyun-cli monitor query-message-subscription
ctyun-cli monitor describe-message-subscription
ctyun-cli monitor notice-pack-list
ctyun-cli monitor notice-pack-used
ctyun-cli monitor notice-pack-limit-detail
ctyun-cli monitor list-monitor-board
ctyun-cli monitor query-monitor-board-sys-services
ctyun-cli monitor query-monitor-board-view-data
ctyun-cli monitor query-ecs-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-pms-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-evs-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-eip-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-traffic-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-elb-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-listener-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-scaling-group-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-zos-user-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-zos-bucket-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-vpc-endpoint-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-vpc-endpoint-service-list --region-id RESOURCE_POOL_ID
ctyun-cli monitor query-monitor-items-by-device --region-id RESOURCE_POOL_ID
# 查询数据导出任务列表
ctyun-cli monitor data-export-tasks --region-id REGION_ID
# 创建数据导出任务
ctyun-cli monitor create-data-export-task --region-id REGION_ID --task-name my-task
# 删除数据导出任务
ctyun-cli monitor delete-data-export-task --region-id REGION_ID --task-ids TASK_ID1,TASK_ID2
# 下载导出文件
ctyun-cli monitor download-data-export-task --region-id REGION_ID --task-id TASK_ID
# 查询拨测点列表
ctyun-cli monitor query-detection-point
# 查询即时拨测任务结果
ctyun-cli monitor query-instant-detection-task --task-id TASK_ID --detect-type http
ctyun-cli billing balance
ctyun-cli billing arrears
ctyun-cli billing account-bill --bill-cycle 202503
ctyun-cli billing bill-summary --bill-cycle 202503
ctyun-cli billing ondemand-flow --bill-cycle 202503
ctyun-cli billing cycle-flow --bill-cycle 202503
ctyun-cli billing cycle-product --bill-cycle 202503
ctyun-cli billing ondemand-resource-cycle --bill-cycle 202212
ctyun-cli iam list-projects
ctyun-cli iam get-project --project-id PROJECT_ID
ctyun-cli iam list-resources
ctyun-cli security examples
ctyun-cli security wrapper --help
ctyun-cli security tamper-update --help
ctyun-cli cda physical-line --help
ctyun-cli cda gateway --help
ctyun-cli cda vpc --help
ctyun-cli cda bgp-route --help
ctyun-cli cda static-route --help
ctyun-cli cda health-check --help
ctyun-cli cda account-auth --help
ctyun-cli kafka list --region-id RESOURCE_POOL_ID
ctyun-cli kafka list -r xxx --name test --exact-match
ctyun-cli kafka list -r xxx --status 1 --page 1 --size 20
ctyun-cli kafka node-status --region-id RESOURCE_POOL_ID --instance-id INSTANCE_ID
ctyun-cli kafka floating-ips --region-id RESOURCE_POOL_ID
ctyun-cli kafka config --region-id RESOURCE_POOL_ID --instance-id INSTANCE_ID
ctyun-cli css list --region-id RESOURCE_POOL_ID --type 1
ctyun-cli css list -r xxx --name test
ctyun-cli css describe --cluster-id CLUSTER_ID
ctyun-cli css logstash-list --region-id RESOURCE_POOL_ID
ctyun-cli emr list --region-id RESOURCE_POOL_ID
ctyun-cli emr list -r xxx --name test --v2
ctyun-cli emr describe --cluster-id CLUSTER_ID
ctyun-cli emr describe --cluster-id CLUSTER_ID --v2
ctyun-cli emr node-groups --cluster-id CLUSTER_ID
ctyun-cli emr node-groups --cluster-id CLUSTER_ID --v2
ctyun-cli emr node-detail --cluster-id CLUSTER_ID
ctyun-cli emr node-detail --cluster-id CLUSTER_ID --node-state 8
ctyun-cli emr meta-overview --cluster-id CLUSTER_ID
ctyun-cli emr meta-table --cluster-id CLUSTER_ID --database test_db --table test_table
ctyun-cli lts --help
ctyun-cli sfs --help
ctyun-cli oceanfs --help
ctyun-cli oceanfs renew-price --region-id REGION_ID --sfs-uid FS_ID --cycle-type month --cycle-cnt 1
ctyun-cli oceanfs upgrade-price --region-id REGION_ID --sfs-uid FS_ID --sfs-size 100
ctyun-cli zos query-price --region-id REGION_ID --pkg-type zosSize --pkg-spec-type ...
ctyun-cli dps list-os --region-id REGION_ID --az-name AZ_NAME
ctyun-cli dps list --region-id REGION_ID --az-name AZ_NAME
ctyun-cli dps list --region-id REGION_ID --az-name AZ_NAME --status RUNNING --page-size 20
ctyun-cli dps describe --region-id REGION_ID --az-name AZ_NAME --instance-uuid INSTANCE_UUID
ctyun-cli dps interfaces --region-id REGION_ID --az-name AZ_NAME --instance-uuid INSTANCE_UUID
ctyun-cli dps volumes --region-id REGION_ID --az-name AZ_NAME --instance-uuid INSTANCE_UUID
ctyun-cli dps image --region-id REGION_ID --az-name AZ_NAME --instance-uuid INSTANCE_UUID
ctyun-cli dps metadata --region-id REGION_ID --az-name AZ_NAME --instance-uuid INSTANCE_UUID
ctyun-cli dps stock --region-id REGION_ID --az-name AZ_NAME
ctyun-cli dps stock --region-id REGION_ID --az-name AZ_NAME --device-type physical.t3.large --count 2
ctyun-cli aone --help
ctyun-cli network --help
ctyun-cli storage --help
ctyun-cli clear-cache
ctyun-cli ecs list --output json | jq '.[] | select(.status=="running")'
ctyun-cli vpc show --vpc-id vpc-xxx --output yaml
ctyun-cli ecs list --debug
ctyun-cli ecs list --profile production
--help 查看具体子命令的详细参数