关于 cli-anything-rms
cli-anything-rms 是通过 Teltonika RMS REST API 管理设备和账户资源的命令行工具,面向路由器、网关和 IoT 设备运维人员,涵盖设备管理、监控与配置。
主要功能
- 01管理设备、公司和用户
- 02创建及管理告警和配置
- 03控制远程访问会话
- 04查看日志和设备位置
- 05管理文件、报告、热点和积分
适用场景
- 01按在线状态或标签列出设备
- 02查看设备告警和日志
- 03创建远程访问会话
- 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