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— 設定ファイルのパス表示
使用例
# オンラインの全デバイスを一覧表示
cli-anything-rms devices list --status online
# デバイス詳細をJSONで取得
cli-anything-rms --json devices get 12345
# 特定デバイスのアラートを確認
cli-anything-rms alerts list --device 12345
# 対話モード
cli-anything-rms