← 返回 Skills 市场
123
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ctyun
功能描述
天翼云CLI工具 - 企业级命令行工具,帮助您轻松管理天翼云资源。支持ECS、VPC、EBS、ELB、CCE、Redis、监控、账务等11大服务模块,覆盖217+个API,210+个命令。
使用说明 (SKILL.md)
天翼云 CLI (ctyun-cli)
天翼云 CLI 工具,功能强大的企业级命令行工具,帮助您轻松管理天翼云资源。支持云服务器(ECS)、监控告警、安全防护、Redis分布式缓存、弹性负载均衡(ELB)、容器引擎(CCE)、VPC网络、费用查询等核心功能。
规模统计: 35,000+行代码,217+个API,210+个命令,11大服务模块
安装
使用 pip 安装(推荐)
pip install ctyun-cli
使用 pipx 安装(隔离环境)
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
测试 API 连接
ctyun-cli test
全局选项
所有命令都支持以下全局选项:
--profile TEXT: 指定配置文件名称--access-key TEXT: 访问密钥--secret-key TEXT: 密钥--region TEXT: 区域--endpoint TEXT: API 端点--output [table|json|yaml]: 输出格式(默认 table)--debug: 启用调试模式
云服务器 (ECS) 管理
列出云主机实例
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
虚拟私有云 (VPC) 管理
列出 VPC
ctyun-cli vpc list
ctyun-cli vpc new-list
查询 VPC 详情
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
弹性公网 IP 查询
ctyun-cli vpc eip
NAT 网关查询
ctyun-cli vpc nat-gateway
VPC 对等连接查询
ctyun-cli vpc peering
流日志查询
ctyun-cli vpc flow-log
云硬盘 (EBS) 管理
列出云硬盘
ctyun-cli ebs list
ctyun-cli ebs list --region cn-north-1 --output json
弹性负载均衡 (ELB) 管理
负载均衡器管理
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
容器引擎 (CCE) 管理
列出集群
ctyun-cli cce list-clusters
查询集群详情
ctyun-cli cce describe-cluster --cluster-id YOUR_CLUSTER_ID
获取 Kubeconfig
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
列出 Pod
ctyun-cli cce list-pods --cluster-id CLUSTER_ID
列出 Deployment
ctyun-cli cce list-deployments --cluster-id CLUSTER_ID
列出 Service
ctyun-cli cce list-services --cluster-id CLUSTER_ID
集群日志管理
ctyun-cli cce logs --help
节点池管理
ctyun-cli cce nodepool --help
弹性伸缩管理
ctyun-cli cce autoscaling --help
ConfigMap 管理
ctyun-cli cce configmap --help
标签管理
ctyun-cli cce tag --help
Redis 分布式缓存服务
列出 Redis 实例
ctyun-cli redis list
查询实例详情
ctyun-cli redis describe --instance-id YOUR_INSTANCE_ID
创建 Redis 实例
ctyun-cli redis create-instance --help
查询可用区
ctyun-cli redis zones
监控数据查询
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 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
CPU Top 排名
ctyun-cli monitor cpu-top
内存 Top 排名
ctyun-cli monitor mem-top
磁盘 Top 排名
ctyun-cli monitor disk-top
账务中心管理
查询账户余额
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 consumption
统一身份认证 (IAM) 管理
查询企业项目列表
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
云专线 (CDA) 管理
物理专线管理
ctyun-cli cda physical-line --help
专线网关管理
ctyun-cli cda gateway --help
VPC 管理
ctyun-cli cda vpc --help
BGP 路由管理
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 network --help
存储管理
ctyun-cli storage --help
缓存管理
清空所有缓存
ctyun-cli clear-cache
使用技巧
JSON 输出便于脚本处理
ctyun-cli ecs list --output json | jq '.[] | select(.status=="running")'
YAML 输出便于阅读
ctyun-cli vpc show --vpc-id vpc-xxx --output yaml
调试模式排查问题
ctyun-cli ecs list --debug
使用指定配置文件
ctyun-cli ecs list --profile production
注意事项
- 首次使用前必须先配置认证信息(推荐使用环境变量方式)
- 大部分命令需要指定资源 ID(如 instance-id、vpc-id 等)
- 建议使用
--help查看具体子命令的详细参数 - 使用 JSON 输出格式便于与其他工具集成
- 按需查询大量数据时建议分页或使用过滤参数
相关链接
- PyPI 包: https://pypi.org/project/ctyun-cli/
- GitHub 仓库: https://github.com/fengyucn/ctyun-cli
- 问题反馈: https://github.com/fengyucn/ctyun-cli/issues
- 作者邮箱: [email protected]
版本信息
- 当前版本: v1.7.16
- 开源协议: MIT
- Python 要求: Python 3.8+
- API 覆盖: 217+ 个 API
- 命令数量: 210+ 个命令
安全使用建议
This skill appears to be a straightforward wrapper/guide for the third‑party ctyun-cli. Before installing or supplying credentials: (1) verify the PyPI package owner and GitHub repository are legitimate and maintained (watch for typosquatting); (2) prefer pipx or a virtualenv to isolate the tool; (3) create and use least-privilege API keys or temporary credentials rather than full-root keys; (4) avoid pasting secrets into shared files or git-tracked files — if you add creds to ~/.bashrc, understand the tradeoffs; (5) inspect the package source (or the wheel) if you need stronger assurance; and (6) pin versions and check package hashes when deploying in production.
功能分析
Type: OpenClaw Skill
Name: ctyun
Version: 1.0.0
The skill bundle provides documentation and integration for 'ctyun-cli', a legitimate command-line tool for managing China Telecom Cloud (CTYun) resources. The SKILL.md file contains standard installation instructions via pip, configuration guides for access keys, and a comprehensive list of commands for managing cloud services like ECS, VPC, and Billing. No evidence of malicious intent, data exfiltration, or prompt injection was found; the tool's behavior is consistent with its stated purpose of cloud resource management.
能力评估
Purpose & Capability
Name, description, and instructions all describe a CLI for managing 天翼云 (CTYUN). Required binary is ctyun-cli and the SKILL.md gives installation instructions (pip, pipx, from source) and command examples that match the stated capability. No unrelated services or credentials are requested.
Instruction Scope
The SKILL.md is a large set of usage examples and install/config instructions for the CLI; it does not instruct the agent to read arbitrary system files, exfiltrate data to unknown endpoints, or access credentials unrelated to CTYUN. All example commands are what you'd expect for a cloud CLI.
Install Mechanism
No install spec is embedded in the skill (instruction-only). The SKILL.md recommends installing from PyPI, pipx, or GitHub — well-known sources and standard mechanisms. No download-from-untrusted-URL or opaque extract steps are present.
Credentials
The documentation tells users how to supply CTYUN_ACCESS_KEY and CTYUN_SECRET_KEY, which is appropriate for a cloud CLI. This is expected, but users should consider using least-privilege credentials and avoid committing long-lived secrets to shell startup files without understanding the risk.
Persistence & Privilege
Skill is not always-enabled (always: false) and is user-invocable. It does not request persistent system privileges, modify other skills, or claim the ability to auto-enable itself.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ctyun - 安装完成后,直接呼叫该 Skill 的名称或使用
/ctyun触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
init .version
元数据
常见问题
ctyun-cli-天翼云-命令行 是什么?
天翼云CLI工具 - 企业级命令行工具,帮助您轻松管理天翼云资源。支持ECS、VPC、EBS、ELB、CCE、Redis、监控、账务等11大服务模块,覆盖217+个API,210+个命令。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 123 次。
如何安装 ctyun-cli-天翼云-命令行?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ctyun」即可一键安装,无需额外配置。
ctyun-cli-天翼云-命令行 是免费的吗?
是的,ctyun-cli-天翼云-命令行 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
ctyun-cli-天翼云-命令行 支持哪些平台?
ctyun-cli-天翼云-命令行 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 ctyun-cli-天翼云-命令行?
由 fengyucn(@fengyucn)开发并维护,当前版本 v1.0.0。
推荐 Skills