Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Websocat

$ websocat Community Med Risk
Vitaly Shukela (vi) · Browser & Web · MIT · macos / linux / windows

websocat bridges standard input/output to ws:// and wss:// WebSockets, Unix sockets, and local test servers. Agents use -1 (--one-message), -n (--no-close), and --jsonrpc to test WebSocket and CDP endpoints cleanly.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
brew install websocat
CLI vs MCP Decision CLI Only

Direct shell bridge for probing WebSocket streams and JSON-RPC endpoints; wrap with timeout or -1 so streams exit cleanly.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Works cleanly in pipes with -1 (--one-message), -t, -0, and --jsonrpc, though open-ended streams will stay open indefinitely without -1 or an external timeout.

  • Supports -1 (--one-message), -E (--exit-on-eof), and --jsonrpc
Trust & Safety 21 / 25

Client-only by default without credential storage; server/exec modes exist if explicitly invoked.

  • Transient -H headers with no stored credential files
Setup & Portability 14 / 15

Compiled Rust binary packaged in Homebrew, Cargo, and Linux repositories.

  • Cross-platform binary via brew, cargo, and GitHub Releases
Utility & Efficiency 13 / 15

Fills the WebSocket gap where curl is awkward, with neat --jsonrpc support for CDP.

  • Handles ws://, wss://, JSON-RPC, and null-delimited frames
Maintenance & Lineage 8 / 10

Established community Rust crate vi/websocat under MIT license.

  • vi/websocat GitHub repository
Docs & Verifiability 8 / 10

Extensive README recipes, though flag combinations can be dense (--help=full).

  • Detailed examples in vi/websocat README

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Passes auth headers transiently via -H "Authorization: Bearer ..."; stores no credentials.

Side Effects
Read-Only Remote Write
Cost & Quotas

Free, MIT open-source Rust binary.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Websocat Agent Rules
- Always pass `-1` (`--one-message`) or wrap with `--ping-interval` / external timeout so persistent WebSocket connections do not hang agent shells.
- Avoid `-s` server mode unless intentionally spawning a background test listener.

Agent-Ready Command Recipes

Safe Read-Only Queries

Send one WebSocket message and exit immediately
echo '{"op":"ping"}' | websocat -1 wss://echo.websocket.events

Sends one JSON line, prints the single response (-1), and closes without hanging.

Controlled Writes & Previews

Send a JSON-RPC request over WebSocket
echo 'Runtime.evaluate {"expression":"1+1"}' | websocat -1 --jsonrpc ws://127.0.0.1:9222/devtools/page/ID

Wraps stdin into a JSON-RPC 2.0 frame (--jsonrpc) and exits after receiving one reply (-1).

Strengths for Agents

  • + -1 (--one-message) makes request/reply WebSocket checks safe and non-blocking.
  • + --jsonrpc streamlines debugging Chrome DevTools Protocol and JSON-RPC sockets.

Caveats & Pitfalls

  • ! Without -1 or an external timeout, websocat stays connected until the server closes.
  • ! Advanced specifier syntax (ws-u:, autoreconnect:) has a learning curve.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI