Installation
Install Subway via curl, Homebrew, cargo, npm, pip, or from source.
You don't need the CLI to use Subway. The TypeScript and Python SDKs connect directly via WebSocket — skip to Language SDKs if you're integrating from code.
CLI#
Quick install
The fastest way on Linux or macOS:
curl -sSL https://subway.dev/install.sh | shThis detects your OS and architecture, downloads the right binary, verifies the checksum, and installs to ~/.local/bin/subway.
Set SUBWAY_INSTALL_DIR to install somewhere else: SUBWAY_INSTALL_DIR=/usr/local/bin curl -sSL https://subway.dev/install.sh | sh
Homebrew
brew install subway-dev/tap/subwayDownload binaries
Pre-built binaries for each release on the Releases page:
| Platform | Archive |
|---|---|
| Linux x86_64 | subway-x86_64-unknown-linux-gnu.tar.gz |
| Linux aarch64 | subway-aarch64-unknown-linux-gnu.tar.gz |
| macOS Intel | subway-x86_64-apple-darwin.tar.gz |
| macOS Apple Silicon | subway-aarch64-apple-darwin.tar.gz |
From source
Requires Rust nightly:
git clone https://github.com/subway-dev/subway
cd subway
cargo build --releaseBinary at target/release/subway.
Verify
subway --versionLanguage SDKs#
TypeScript / JavaScript
npm install subway-sdkWorks in Node.js 18+, Deno, and Bun. The SDK provides SubwayClient (persistent WebSocket agent) and SubwayRestClient (stateless HTTP). See the TypeScript quickstart.
Python
pip install websocketsPython connects via the raw WebSocket protocol — no SDK dependency needed. See the Python quickstart.
Rust
[dependencies]
subway-core = { git = "https://github.com/subway-dev/subway.git" }
subway-proto = { git = "https://github.com/subway-dev/subway.git" }Native Rust agents use AgentNode directly — no bridge, full QUIC transport. See the Rust quickstart.