ws
Simple, fast WebSocket client and server for Node.js with full RFC support.
HTTP clients and networking npm MIT
Used in agent projects
287
2.3% of 12,697 public repos built with AI coding agents
Rank in http clients and networking
#4 of 29
by use in those projects
Downloads
283M
npm, last 7 days, ws
GitHub stars
22.8K
last push Oct 9, 2026
How ws is used
ws is a dependency in 287 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (2.3%), #4 of 29 in http clients and networking. The most used alternative there is Axios. Projects that use it most often also use tsx (39.4%), Express (37.3%), TypeScript (83.3%).
Often used with ws
| tsx | 39.4% of ws projects · 4.0× more than average |
|---|---|
| Express | 37.3% of ws projects · 5.8× more than average |
| TypeScript | 83.3% of ws projects · 1.5× more than average |
| Zod | 46.0% of ws projects · 2.7× more than average |
| dotenv | 41.5% of ws projects · 2.6× more than average |
| Vitest | 34.1% of ws projects · 2.8× more than average |
| esbuild | 23.0% of ws projects · 8.5× more than average |
| TanStack Query | 28.2% of ws projects · 2.9× more than average |
By coding agent
| Claude Code | 2.8% of projects set up for it |
|---|---|
| GitHub Copilot | 2.2% of projects set up for it |
| Cursor | 2.6% of projects set up for it |
| OpenAI Codex | 3.6% of projects set up for it |
| Devin Desktop | 4.7% of projects set up for it |
| Gemini CLI | 2.3% of projects set up for it |
| OpenCode | 3.1% of projects set up for it |
Share of public repos configured for each agent that list ws as a dependency.
Install
| Package | npm install ws |
|---|---|
| Main stacks | TypeScript / JavaScript (188), Next.js (80), Python (17), Rust (2) |
| Example projects | LeagueAkari/LeagueAkari, ding113/claude-code-hub, blockscout/frontend, narnia-sh/layrr, 5pyj29s7cm-tech/LumiCore |
Alternatives to ws
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Axios npm Promise-based HTTP client for browser and Node.js with interceptors. |
1,264 (10.0%) | 115M | 109K | MIT |
| Requests pypi Elegant Python HTTP library for making web requests. |
675 (5.3%) | 309M | 54.6K | Apache-2.0 |
| aiohttp pypi Async HTTP client/server framework for Python with WebSocket support. |
295 (2.3%) | 117M | 16.6K | — |
| websockets pypi WebSocket implementation for Python with RFC 6455 and 7692 compliance. |
286 (2.3%) | 109M | 5,732 | — |
| httpx pypi Modern Python HTTP client with async support, replacing the standard requests library. |
266 (2.1%) | 16M | 15.6K | BSD-3-Clause |
| node-fetch npm Bring the Fetch API to Node.js for making HTTP requests. |
219 (1.7%) | 207M | 8,852 | MIT |
| urllib3 pypi HTTP client with thread-safe connection pooling, file uploads and advanced features. |
193 (1.5%) | 338M | 4,071 | — |
| AnyIO pypi Async I/O framework supporting both asyncio and Trio with high-level networking abstractions. |
186 (1.5%) | 206M | 2,555 | — |