cli-anything-rms
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecli-anything-rms
cli-anything-rms
CLI harness for Teltonika RMS (Remote Management System). Manage routers, gateways, and IoT devices via the RMS REST API.
用于Teltonika RMS(远程管理系统)的CLI工具。通过RMS REST API管理路由器、网关和IoT设备。
Installation
安装
bash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=rms/agent-harnessbash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=rms/agent-harnessAuthentication
身份验证
Set environment variable or run .
RMS_API_TOKENcli-anything-rms config set api_token <token>设置环境变量,或运行。
RMS_API_TOKENcli-anything-rms config set api_token <token>Command Groups
命令组
devices
devices
- — List devices
devices list [--status online|offline] [--tag TAG] [--limit N] [--offset N] [--sort FIELD] - — Get device details
devices get <device_id> - — Update device
devices update <device_id> [--name NAME] [--tag TAG] - — Delete device
devices delete <device_id>
- — 列出设备
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 companies
companies list [--limit N] [--offset N] - — Get company details
companies get <company_id> - — Create company
companies create --name NAME - — Update company
companies update <company_id> [--name NAME] - — Delete company
companies delete <company_id>
- — 列出企业
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 users
users list [--limit N] [--offset N] - — Get user details
users get <user_id> - — Invite user
users invite --email EMAIL [--role ROLE] - — Update user
users update <user_id> [--role ROLE] - — Delete user
users delete <user_id>
- — 列出用户
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 tags
tags list [--limit N] [--offset N] - — Get tag details
tags get <tag_id> - — Create tag
tags create --name NAME - — Update tag
tags update <tag_id> [--name NAME] - — Delete tag
tags delete <tag_id>
- — 列出标签
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 alerts
alerts list [--device DEVICE_ID] [--limit N] [--offset N] - — Get alert details
alerts get <alert_id> - — Delete alert
alerts delete <alert_id> - — List alert configurations
alerts configs list - — Get alert config
alerts configs get <config_id> - — Create alert config
alerts configs create --data JSON - — Update alert config
alerts configs update <config_id> --data JSON - — Delete alert config
alerts configs delete <config_id>
- — 列出告警
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 configurations
configs list [--device DEVICE_ID] [--limit N] [--offset N] - — Get configuration
configs get <config_id> - — Update configuration
configs update <config_id> --data JSON
- — 列出设备配置
configs list [--device DEVICE_ID] [--limit N] [--offset N] - — 获取配置详情
configs get <config_id> - — 更新配置
configs update <config_id> --data JSON
remote-access
remote-access
- — List sessions
remote-access list [--device DEVICE_ID] [--limit N] - — Get session details
remote-access get <session_id> - — Create session
remote-access create --device DEVICE_ID [--protocol PROTO] [--port PORT] - — Delete session
remote-access delete <session_id>
- — 列出远程会话
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 logs
logs list [--device DEVICE_ID] [--limit N] [--offset N] - — Get log details
logs get <log_id> - — Delete log
logs delete <log_id>
- — 列出日志
logs list [--device DEVICE_ID] [--limit N] [--offset N] - — 获取日志详情
logs get <log_id> - — 删除日志
logs delete <log_id>
location
location
- — Get current device location
location get <device_id> - — Location history
location history <device_id> [--limit N] [--offset N]
- — 获取设备当前位置
location get <device_id> - — 获取设备位置历史
location history <device_id> [--limit N] [--offset N]
credits
credits
- — List credits
credits list [--limit N] [--offset N] - — Transfer credits
credits transfer --code CODE - — List transfer codes
credits codes [--limit N]
- — 列出积分
credits list [--limit N] [--offset N] - — 转移积分
credits transfer --code CODE - — 列出转移码
credits codes [--limit N]
files
files
- — List files
files list [--limit N] [--offset N] - — Get file details
files get <file_id> - — Upload file
files upload <file_path> - — Delete file
files delete <file_id>
- — 列出文件
files list [--limit N] [--offset N] - — 获取文件详情
files get <file_id> - — 上传文件
files upload <file_path> - — 删除文件
files delete <file_id>
reports
reports
- — List reports
reports list [--limit N] [--offset N] - — Get report
reports get <report_id> - — Create report
reports create --template TEMPLATE_ID [--name NAME] - — Delete report
reports delete <report_id> - — List report templates
reports templates list
- — 列出报告
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 hotspots
hotspots list [--device DEVICE_ID] [--limit N] - — Get hotspot details
hotspots get <hotspot_id> - — Create hotspot
hotspots create --device DEVICE_ID --name NAME - — Update hotspot
hotspots update <hotspot_id> [--name NAME] - — Delete hotspot
hotspots delete <hotspot_id>
- — 列出热点
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 password
passwords get <device_id> - — Update password
passwords update <device_id> --password PASSWORD - — Update password (reads from stdin, safer)
passwords update <device_id> --password-stdin
- — 获取设备密码
passwords get <device_id> - — 更新设备密码
passwords update <device_id> --password PASSWORD - — 更新设备密码(从标准输入读取,更安全)
passwords update <device_id> --password-stdin
smtp
smtp
- — List SMTP configs
smtp list [--limit N] [--offset N] - — Get SMTP config
smtp get <config_id> - — Create SMTP config
smtp create --host HOST [--port PORT] [--username USER] [--password PASS] - — Update SMTP config
smtp update <config_id> [--host HOST] [--port PORT] - — Delete SMTP config
smtp delete <config_id>
- — 列出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>
auth
auth
- — Test API connectivity
auth test - — Show current auth info
auth status
- — 测试API连接性
auth test - — 显示当前身份验证信息
auth status
config
config
- — Set configuration (api_token, default_limit)
config set <key> <value> - — Show configuration
config get [key] - — Delete configuration
config delete <key> - — Show config file path
config path
- — 设置配置项(api_token、default_limit)
config set <key> <value> - — 显示配置信息
config get [key] - — 删除配置项
config delete <key> - — 显示配置文件路径
config path
Examples
示例
bash
undefinedbash
undefinedList all online devices
列出所有在线设备
cli-anything-rms devices list --status online
cli-anything-rms devices list --status online
Get device details as JSON
以JSON格式获取设备详情
cli-anything-rms --json devices get 12345
cli-anything-rms --json devices get 12345
Check alerts for a specific device
检查指定设备的告警
cli-anything-rms alerts list --device 12345
cli-anything-rms alerts list --device 12345
Interactive mode
交互模式
cli-anything-rms
undefinedcli-anything-rms
undefined