Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

iaterm-ws-clientiaterm ws 客户端

Agent Skill

iaterm-ws-client 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

8,786

周安装

352

GitHub Stars

公开资料未说明

下载量

2,844
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:iaterm-ws-client(iaterm ws 客户端)
来源仓库:https://github.com/sutaixu/iaterm-ws-client
安装命令:
openclaw skills install iaterm-ws-client
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install iaterm-ws-client

简介

通过本地 WebSocket API 与 IATerm 终端交互,实现工作区管理、面板显示和账户查看。

  • 适用于需要快速操作 IATerm 的场景,如列出工作区、展示面板或查询账户信息。
  • 使用 openclaw skills install iaterm-ws-client 安装,需确认本地服务端口 19790 是否可用。
  • 涉及本地命令执行和网络通信,建议检查权限并确保环境安全后再启用。
  • 维护状态和兼容性请参考 GitHub 仓库及原始 README 文档。

SKILL.md

name
iaterm-ws-agent
description
Interact with IATerm terminals via the local WebSocket API (ws://127.0.0.1:19790/ws). Use when the user asks to list workspaces, displays, or panels, view active terminal connections, send commands to a terminal, or capture/subscribe to terminal output. Also use when integrating external AI agents with IATerm.
metadata
short-description
Control IATerm terminals via WebSocket API

IATerm WebSocket Agent

Control IATerm terminals via the local WebSocket API.

CRITICAL: Always use the ws_client.py script

NEVER write inline WebSocket code. Always use the provided CLI script at scripts/ws_client.py (relative to this skill file).

Find the script path:

SKILL_DIR="$(dirname "$(find ~/.opc/skills -name ws_client.py -path "*/iaterm-ws-agent/*" 2>/dev/null | head -1)")"
WS_CLIENT="$SKILL_DIR/ws_client.py"

Prerequisites

pip install websockets 2>/dev/null || pip3 install websockets 2>/dev/null

Session ID (IMPORTANT)

IATERM_SESSION_ID environment variable must be set by the host application (e.g. IATerm) before invoking the client. Do NOT generate this value yourself — if the variable is missing, the client will exit with an error, indicating the host application has not properly initialized the session.

The first command triggers user approval in the IATerm UI. Once approved, the WS token is cached at ~/.cache/iaterm-ws-client/ws_token.json (permissions 0600). Subsequent commands reuse the cached token and skip approval.

If the token expires, the client automatically clears the cache and re-prompts for approval.

Operation Approval

send_input and subscribe_output require interactive confirmation before execution:

[Approval] send_input to conn-123: 'ls -la\
'
  y = approve this time  |  n = reject  |  a = always approve for this target
  [y/n/a]:
  • y — approve this single invocation
  • n — reject (command exits with error)
  • a — always approve for this specific target (saved to ~/.cache/iaterm-ws-client/approval.json)

Use --auto-approve to skip all confirmation prompts (for automated pipelines):

python3 "$WS_CLIENT" --auto-approve send_input --connection-id <id> --data "ls\
"

Commands

List workspaces

python3 "$WS_CLIENT" list_workspaces

List displays for a workspace

python3 "$WS_CLIENT" list_displays --workspace-id <id>

List panels (all or filtered by workspace)

python3 "$WS_CLIENT" list_panels
python3 "$WS_CLIENT" list_panels --workspace-id <id>

Get panel info

python3 "$WS_CLIENT" get_panel_info --panel-id <id>

List active connections

IMPORTANT: list_connections only returns remote connections (SSH, Serial, JumpServer). Local terminal connections are automatically filtered out by the backend. If this command returns connections, they are ALL remote — do NOT judge by the name field. Always check the connection_type field to determine the actual type:

  • ssh — SSH remote connection
  • serial — Serial port connection

If the result is empty, it means there are no active remote connections (local terminals may still exist but are excluded from this API).

python3 "$WS_CLIENT" list_connections
python3 "$WS_CLIENT" list_connections --type ssh

Send input to a terminal

python3 "$WS_CLIENT" send_input --connection-id <id> --data "ls -la\
"

Use \ for Enter, \ for Tab, \ for Ctrl-C.

Subscribe to terminal output (long-lived, Ctrl-C to stop)

python3 "$WS_CLIENT" subscribe_output --connection-id <id>

How it works

  1. Each command establishes an independent WebSocket connection, executes, and disconnects.
  2. First connection — sends identify(session_id) → user approves in IATerm UI (up to 60s) → receives ws_token → cached to disk.
  3. Subsequent connections — sends identify(session_id + cached token) → server recognizes the token → skips approval → executes immediately.
  4. Token expiry — if the server rejects a cached token (error -15 or connection_rejected), the client clears the cache and retries with a fresh approval flow.
  5. Approval gatesend_input and subscribe_output prompt for interactive confirmation (y/n/a) unless --auto-approve is set.

Configuration

Env VariableDefaultDescription
IATERM_SESSION_ID*(required)*Stable identifier for this agent session
IATERM_WS_PORT19790WebSocket server port
XDG_CACHE_HOME~/.cacheBase directory for token/approval cache

Changelog

v2.0.0 — 无 Daemon 直连架构 + 安全防护增强

架构重写:去 Daemon 化

  • 删除 WsDaemon 类、Unix socket IPC、daemon 生命周期管理(_send_msg/_recv_msg/_start_daemon_bg/_stop_daemon 等)
  • 删除 daemonstop 子命令和 --session 参数
  • 删除不再需要的 imports:signalsocketstructsubprocess
  • 每条命令独立建立 WS 连接,执行完断开,无常驻后台进程

连接与认证

  • Session ID 从 IATERM_SESSION_ID 环境变量获取,由宿主应用设置,禁止自行生成,缺失则报错退出
  • 首次连接:identify(session_id) → IATerm UI 审批 → 获得 ws_token → 缓存至 ~/.cache/iaterm-ws-client/ws_token.json(权限 0600)
  • 后续连接:identify(session_id + cached token) → 服务端识别 → 跳过审批 → 直接执行
  • Token 失效(error -15 或 connection_rejected)时自动清缓存,重走审批流程

操作审批

  • send_input / subscribe_output 执行前交互式确认:y(本次通过)/ n(拒绝)/ a(始终通过)
  • a 记入 ~/.cache/iaterm-ws-client/approval.json,后续同目标操作自动通过
  • --auto-approve CLI 参数跳过所有确认(用于自动化流水线)

文档补充

  • list_connections 明确只返回远程连接(SSH/Serial/JumpServer),本地终端被后端过滤
  • 连接类型判断统一使用 connection_type 字段,不依赖 name 字段

v1.0.2 — Security scan compliance

  • Daemon startup via subprocess.Popen(start_new_session=True)
  • State directory moved to ~/.cache/iaterm-ws-client/ (XDG)
  • Explicit .replace() escapes instead of .encode().decode("unicode_escape")
  • Session token written to file (permissions 0600) instead of stderr

Typical Workflow

# IATERM_SESSION_ID is set by the host application — do not generate it manually

# 1. Connect — first call triggers approval in IATerm UI
python3 "$WS_CLIENT" list_workspaces

# 2. Discover — find the connection_id (token cached, no re-approval)
python3 "$WS_CLIENT" list_panels
python3 "$WS_CLIENT" list_connections

# 3. Execute — send command to a terminal (prompts for approval)
python3 "$WS_CLIENT" send_input --connection-id <id> --data "ls -la\
"

# 4. Read — get terminal output
python3 "$WS_CLIENT" subscribe_output --connection-id <id>

API Reference (for understanding responses)

Response format

  • Success: { "result": { ... } }
  • Error: { "error": { "code": <int>, "message": "..." } }

Error codes

CodeMeaning
-1Method not found
-2Invalid params
-3Internal error
-5Connection not found
-6Rate limited
-14Connection limit (another client connected)
-15Auth failed (invalid or missing token)

Key object fields

  • workspace: id, name, description, is_default, sort_order
  • display: id, workspace_id, display_index, name
  • panel: id, workspace_id, connection_id, display_id, name, grid_row, grid_column
  • connection: id, name, connection_type (use this to determine type, NOT name), status, created_at, bytes_sent, bytes_received

Important Notes

  • IATerm must be running for the API to be available
  • The API only binds to 127.0.0.1; not accessible remotely
  • First connection requires user approval in IATerm UI (60s timeout)
  • Only one client connection allowed at a time
  • send_input is rate-limited to 30 calls/sec per connection
  • connection_id comes from list_connections or panel's connection_id field

Custom Theme Format

Custom themes are stored as JSON in ~/.iaterm/themes/{theme-id}.json. Optional CSS override: ~/.iaterm/themes/{theme-id}.css.

{
  "id": "my-theme",
  "name": "my-theme",
  "displayName": "My Theme",
  "type": "dark",
  "designRationale": "Design description (200-500 chars)",
  "variables": {
    "backgroundPrimary": "#0d1117",
    "backgroundSecondary": "#161b22",
    "backgroundTertiary": "#21262d",
    "backgroundCard": "#1c2128",
    "backgroundCardHover": "#262c36",
    "textPrimary": "#e6edf3",
    "textSecondary": "#8b949e",
    "textMuted": "#484f58",
    "accentPrimary": "#58a6ff",
    "error": "#f85149",
    "success": "#3fb950",
    "warning": "#d29922",
    "borderPrimary": "#30363d",
    "borderSubtle": "#21262d",
    "borderAccent": "#58a6ff",
    "iconDefault": "#8b949e",
    "iconHover": "#e6edf3"
  }
}
  • type: "light" | "dark" | "auto"
  • All color values: hex format (#rrggbb or #rrggbbaa)
  • CSS variables auto-mapped: backgroundPrimary--color-background-primary

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.93%
按下载量换算2,814

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills