Remote Linux management for Alma via SSH/SFTP with persistent stateful SSH sessions, thread-session binding, an NL-to-command bridge, an xterm.js WebSocket terminal bridge, dangerous-command approval flows, a strict command policy option, host-key verification modes, RBAC allowlists, and SIEM-friendly redacted audit fields.
Use this project to manage remote Linux hosts from Alma with safety controls.
run_command, run_batchexecute_command, execute_batchapproval_id)approval.allowed_operators)policy.strict_policy=false (compatible mode)policy.strict_policy=true (normalized/token-level matching)ssh.host_key_policy):
known_hosts (RejectPolicy + optional known_hosts_required)reject (strict reject unknown hosts)auto_add (compatibility mode)server_profiles/<IP>.mdJSONL) with SIEM-friendly fields and safety:
request_id / trace_id / operator_ippassword/token/secret/key/passphrase)stdout/stderr truncated for log safetyopen_session, list_sessions, close_sessionrun_command_in_session, write_session, read_session, resize_sessionsession.storage_file)start_terminal_ws returns ws://.../terminal/<session_id>stop_terminal_ws unregisters a session or stops the WS serversend_keys_to_session supports ESC/UP/DOWN/LEFT/RIGHT/TAB/ENTERbind_thread_session, get_thread_session, unbind_thread_sessionensure_thread_session (auto-open and bind when missing)plan_command_from_text (plan only)execute_text_in_session (plan + run in persistent session)git clone https://github.com/adfoke/alma-linux-remote-plugin.git
cd alma-linux-remote-plugin
uv sync --all-extras
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle health
uv run python demo_cli.py --config ./examples/hosts.example.yaml tools
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle execute_command '{"host_name":"prod-web-1","command":"uptime"}'
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle open_session '{"host_name":"prod-web-1"}'
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle list_sessions '{"status":"all"}'
uv run python demo_cli.py --config ./examples/hosts.example.yaml plan-text thread-a prod-web-1 "帮我看下磁盘和内存"
uv run python demo_cli.py --config ./examples/hosts.example.yaml exec-text thread-a prod-web-1 "查看 nginx 状态和最近日志"
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle send_keys_to_session '{"session_id":"<SESSION_ID>","keys":["ESC",":wq","ENTER"]}'
English doc: README.en.md
approval_required and approval_idapprove_request with allowed operatorapproval_idplugin.py now uses _with_connected_client(...) to consolidate repeated connect/close patterns.ssh_client.py and terminal_ws.py to keep critical path coverage high.uv run ruff check src tests demo_cli.py
uv run pytest --cov=src/alma_linux_remote_plugin --cov-report=term-missing --cov-fail-under=65
src/alma_linux_remote_plugin/runtime_adapter.pyplugin.yamlSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer