# 使用 Homebrew, apk, MacPorts, Nix, pacman, scoop 安装 websocat

查看 websocat 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:websocat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install websocat
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install websocat
```

  证据: MacPorts ports tree: net/websocat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add websocat
```

  证据: Alpine Linux edge package indexes: websocat from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#websocat
```

  证据: nixpkgs package indexes: pkgs/by-name/we/websocat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S websocat
```

  证据: Arch Linux sync databases: websocat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/websocat
```

  证据: Scoop official bucket manifest trees: bucket/websocat.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:websocat
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/websocat>
- **版本:** 1.14.1
- **来源摘要:** Command-line client for WebSockets
- **主页:** <https://github.com/vi/websocat>
- **仓库:** <https://github.com/vi/websocat>
- **上游文档:** <https://github.com/vi/websocat#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/vi/websocat/archive/refs/tags/v1.14.1.tar.gz>
- **已生成:** 2026-07-25T07:20:51+00:00

## 可执行文件

- websocat (cli)
- websocat (别名)

## 构建依赖

- pkgconf
- rust

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-25
- 管理器版本: 1.14.1
- 本地数据: OK
- 上游仓库: https://github.com/vi/websocat
- 检测到的最新版本: v1.14.1 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

websocat is a Rust command-line WebSocket client and relay tool created by Vitaly "Vi" Shukela. Its own documentation describes it as the WebSocket analogue of netcat, curl, or socat: a small CLI that connects standard input/output, TCP, Unix sockets, subprocesses, and WebSocket endpoints.

### 项目历史

The GitHub repository and crates.io package both date from November 2016, placing websocat in the wave of developer tools that treated RFC 6455 WebSockets as a normal Unix-stream target rather than only a browser API. The project grew around a compact idea: make `ws://` and `wss://` endpoints scriptable from a shell while still supporting more advanced socat-style addressing and overlays.

The reference manual documents three enduring modes: simple client mode, simple server mode, and an advanced mode that connects two address specifications. Later releases kept that model while adding a large address/overlay vocabulary, binary and text handling, subprocess bridging, proxying, TLS/WebSocket options, and server-side use cases.

### 采用历史

websocat became a common package-manager tool because it filled the same niche for WebSockets that `curl` fills for HTTP and `nc` fills for TCP: quick inspection, smoke testing, and shell automation. By July 2026, the GitHub repository had more than eight thousand stars, and the crates.io package metadata showed publication continuity from 2016 through the 1.14.x line.

Its README explicitly lists sibling tools such as wscat, websocketd, wstunnel, and wsd, which situates websocat in a small ecosystem of command-line WebSocket utilities. Compared with simpler clients, its package-nerd appeal is the socat-like address system that lets it act as a connector, relay, or miniature protocol adapter.

### 使用方式

Typical use starts with `websocat wss://example/path` to send terminal lines as WebSocket messages and print replies. The same binary can listen as a WebSocket server, forward between WebSocket and TCP or Unix sockets, or run an external program and connect that process to a WebSocket stream.

Because it is useful in pipelines, CI smoke tests, reverse-proxy debugging, and ad hoc protocol work, websocat is often installed alongside curl, netcat, socat, and jq on developer machines rather than deployed as an application dependency.

### 为什么软件包爱好者会关心

websocat matters to package-manager users because it turns WebSockets into a first-class shell transport. It is the boring, dependable diagnostic binary people reach for when a browser console, custom script, or full application client would be too much machinery.

### 时间线

- 2016-11: GitHub repository and crates.io package created.
- 2019: Public issues and examples show users applying websocat to JSON requests, recording output, and WebSocket testing workflows.
- 2024-11: v1.14.0 release described as the 1.x line nearing sunset while Websocat4 previews began.
- 2025-12: v1.14.1 maintenance release and v4.0.0 alpha releases published.

### Related projects

- The README points users toward wstunnel, wscat, websocketd, and wsd as related WebSocket command-line tools. websocat is closest in spirit to socat and netcat because it focuses on connecting endpoints rather than embedding a WebSocket library in an application.

### 来源

- <https://api.github.com/repos/vi/websocat>
- <https://api.github.com/repos/vi/websocat/releases?per_page=5>
- <https://crates.io/api/v1/crates/websocat>
- <https://github.com/vi/websocat>
- <https://github.com/vi/websocat/blob/master/doc.md>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** websocat
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Nix - websocat: normalized package name match | nixpkgs package indexes: pkgs/by-name/we/websocat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - websocat - 1.14.1-r0: normalized package name match | Alpine Linux edge package indexes: websocat from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Netcat, curl and socat for WebSockets | https://github.com/vi/websocat
- pacman - websocat - 1.14.1-1: normalized package name match | Arch Linux sync databases: websocat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command-line client for web sockets, like netcat/curl/socat for ws:// | https://github.com/vi/websocat/
- MacPorts - websocat: normalized package name match | MacPorts ports tree: net/websocat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/websocat: normalized package name match | Scoop official bucket manifest trees: bucket/websocat.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [pkgconf](https://www.automicvault.com/zh-hans/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://www.automicvault.com/zh-hans/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [bbftp-client](https://www.automicvault.com/zh-hans/pkg/brew/bbftp-client/) - Shares av.db curated category or tags: cli, client, networking.
- [dante](https://www.automicvault.com/zh-hans/pkg/brew/dante/) - Shares av.db curated category or tags: cli, client, networking.
- [dstp](https://www.automicvault.com/zh-hans/pkg/brew/dstp/) - Shares av.db curated category or tags: cli, networking, testing.
- [mongoose](https://www.automicvault.com/zh-hans/pkg/brew/mongoose/) - Shares av.db curated category or tags: cli, networking, websocket.
- [sipsak](https://www.automicvault.com/zh-hans/pkg/brew/sipsak/) - Shares av.db curated category or tags: cli, networking, testing.
- [vpcs](https://www.automicvault.com/zh-hans/pkg/brew/vpcs/) - Shares av.db curated category or tags: cli, networking, testing.
- [aerleon](https://www.automicvault.com/zh-hans/pkg/brew/aerleon/) - Shares av.db curated category or tags: cli, networking.
- [ahcpd](https://www.automicvault.com/zh-hans/pkg/brew/ahcpd/) - Shares av.db curated category or tags: cli, networking.
- [q](https://www.automicvault.com/zh-hans/pkg/brew/q/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, client, command-line, line, networking.
- [yafc](https://www.automicvault.com/zh-hans/pkg/brew/yafc/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, client, command-line, line, networking.

## Combined YAML source

View the package source record on GitHub. [combined/websocat.yml](https://github.com/automic-vault/db/blob/main/combined/websocat.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
