A WebSocket API on littlebear-vegas that replicates SSH command
execution. Built for environments where SSH is blocked or fragile
(e.g. behind an egress proxy) but HTTPS (port 443) is allowed.
curl -sSL https://ws.api.littlebearz.com/install.sh | bash
# then:
vegas "uptime"
The installer downloads the vegas-ws client, prompts for your
API key, and verifies the connection.
Client ──wss://ws.api.littlebearz.com:443──> nginx (vegas)
│ proxy_pass + Upgrade headers
▼
ws://127.0.0.1:8223
(ws_api_server.py, pure Python stdlib)
Commands run as the littlebear user via /bin/bash -c.
There is no PTY, no file transfer, and no port forwarding — command execution only.
This API is designed to be driven by AI agents as an SSH alternative. Two integration paths:
Install once, then run commands exactly like SSH:
vegas "df -h /"
echo "systemctl status nginx" | vegas
vegas --timeout 120 "apt list --upgradable"
The vegas wrapper tries the WebSocket API first and falls back
to ssh littlebear-vegas only on transport failure (exit 255).
A non-zero exit from the remote command itself is passed through unchanged.
Environment overrides: VEGAS_WS_URL, VEGAS_WS_KEY,
VEGAS_WS_KEY_FILE, VEGAS_WS_CA,
VEGAS_WS_INSECURE=1, plus standard HTTPS_PROXY.
JSON messages over WebSocket (RFC 6455). Any language with a WebSocket client works:
C -> S: {"auth": "<api_key>"}
S -> C: {"ok": true} | {"error": "auth failed"} (then closed)
C -> S: {"cmd": "<shell command>", "timeout": 60}
S -> C: {"stdout": "...", "stderr": "...", "exit": 0}
{"error": "auth failed"} and the connection is closed.timeout is clamped to 1–600s (default 60).| Endpoint | Network | TLS |
|---|---|---|
wss://ws.api.littlebearz.com | Public internet | Let's Encrypt |
wss://100.64.0.22:8222 | Tailscale only | Self-signed |
~/.ws_api_key on the server and ~/.ws_api_key_vegas
on clients./install.sh — online installer/vegas-ws — Python client (no dependencies)/README.md — full documentation