mcpField
C
cli-anything-rms

cli-anything-rms

github.com/hkuds云与 DevOps57.6k459 次安装5 周前更新
代码仓库

关于 cli-anything-rms

cli-anything-rms 是通过 Teltonika RMS REST API 管理设备和账户资源的命令行工具,面向路由器、网关和 IoT 设备运维人员,涵盖设备管理、监控与配置。

主要功能

  1. 01管理设备、公司和用户
  2. 02创建及管理告警和配置
  3. 03控制远程访问会话
  4. 04查看日志和设备位置
  5. 05管理文件、报告、热点和积分

适用场景

  1. 01按在线状态或标签列出设备
  2. 02查看设备告警和日志
  3. 03创建远程访问会话
  4. 04更新设备设置或密码

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/hkuds/cli-anything --skill cli-anything-rms

安装后在 Claude Code 中输入/cli-anything-rms确认已加载。

详细介绍

cli-anything-rms

面向 Teltonika RMS(远程管理系统)的 CLI 工具。通过 RMS REST API 管理路由器、网关和 IoT 设备。

安装

pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=rms/agent-harness

身份验证

设置 RMS_API_TOKEN 环境变量,或运行 cli-anything-rms config set api_token <token>。

命令组

devices
  • devices list [--status online|offline] [--tag TAG] [--limit N] [--offset N] [--sort FIELD] — 列出设备
  • devices get <device_id> — 获取设备详情
  • devices update <device_id> [--name NAME] [--tag TAG] — 更新设备
  • devices delete <device_id> — 删除设备
companies
  • companies list [--limit N] [--offset N] — 列出公司
  • companies get <company_id> — 获取公司详情
  • companies create --name NAME — 创建公司
  • companies update <company_id> [--name NAME] — 更新公司
  • companies delete <company_id> — 删除公司
users
  • users list [--limit N] [--offset N] — 列出用户
  • users get <user_id> — 获取用户详情
  • users invite --email EMAIL [--role ROLE] — 邀请用户
  • users update <user_id> [--role ROLE] — 更新用户
  • users delete <user_id> — 删除用户
tags
  • tags list [--limit N] [--offset N] — 列出标签
  • tags get <tag_id> — 获取标签详情
  • tags create --name NAME — 创建标签
  • tags update <tag_id> [--name NAME] — 更新标签
  • tags delete <tag_id> — 删除标签
alerts
  • alerts list [--device DEVICE_ID] [--limit N] [--offset N] — 列出告警
  • alerts get <alert_id> — 获取告警详情
  • alerts delete <alert_id> — 删除告警
  • alerts configs list — 列出告警配置
  • alerts configs get <config_id> — 获取告警配置
  • alerts configs create --data JSON — 创建告警配置
  • alerts configs update <config_id> --data JSON — 更新告警配置
  • alerts configs delete <config_id> — 删除告警配置
configs
  • configs list [--device DEVICE_ID] [--limit N] [--offset N] — 列出设备配置
  • configs get <config_id> — 获取配置
  • configs update <config_id> --data JSON — 更新配置
remote-access
  • remote-access list [--device DEVICE_ID] [--limit N] — 列出会话
  • remote-access get <session_id> — 获取会话详情
  • remote-access create --device DEVICE_ID [--protocol PROTO] [--port PORT] — 创建会话
  • remote-access delete <session_id> — 删除会话
logs
  • logs list [--device DEVICE_ID] [--limit N] [--offset N] — 列出日志
  • logs get <log_id> — 获取日志详情
  • logs delete <log_id> — 删除日志
location
  • location get <device_id> — 获取设备当前位置
  • location history <device_id> [--limit N] [--offset N] — 位置历史记录
credits
  • credits list [--limit N] [--offset N] — 列出点数
  • credits transfer --code CODE — 转移点数
  • credits codes [--limit N] — 列出转移码
files
  • files list [--limit N] [--offset N] — 列出文件
  • files get <file_id> — 获取文件详情
  • files upload <file_path> — 上传文件
  • files delete <file_id> — 删除文件
reports
  • reports list [--limit N] [--offset N] — 列出报告
  • reports get <report_id> — 获取报告
  • reports create --template TEMPLATE_ID [--name NAME] — 创建报告
  • reports delete <report_id> — 删除报告
  • reports templates list — 列出报告模板
hotspots
  • hotspots list [--device DEVICE_ID] [--limit N] — 列出热点
  • hotspots get <hotspot_id> — 获取热点详情
  • hotspots create --device DEVICE_ID --name NAME — 创建热点
  • hotspots update <hotspot_id> [--name NAME] — 更新热点
  • hotspots delete <hotspot_id> — 删除热点
passwords
  • passwords get <device_id> — 获取设备密码
  • passwords update <device_id> --password PASSWORD — 更新密码
  • passwords update <device_id> --password-stdin — 更新密码(从 stdin 读取,更安全)
smtp
  • smtp list [--limit N] [--offset N] — 列出 SMTP 配置
  • smtp get <config_id> — 获取 SMTP 配置
  • smtp create --host HOST [--port PORT] [--username USER] [--password PASS] — 创建 SMTP 配置
  • smtp update <config_id> [--host HOST] [--port PORT] — 更新 SMTP 配置
  • smtp delete <config_id> — 删除 SMTP 配置
auth
  • auth test — 测试 API 连通性
  • auth status — 显示当前认证信息
config
  • config set <key> <value> — 设置配置(api_token、default_limit)
  • config get [key] — 显示配置
  • config delete <key> — 删除配置
  • config path — 显示配置文件路径

示例

# List all online devices
cli-anything-rms devices list --status online

# Get device details as JSON
cli-anything-rms --json devices get 12345

# Check alerts for a specific device
cli-anything-rms alerts list --device 12345

# Interactive mode
cli-anything-rms

评论

支持 Markdown