Install
Install the osmRouter CLI on macOS or Linux, or pull in the Node SDK.
The osmRouter client is a single static binary with no runtime dependencies.
There are two ways to get a tunnel: the CLI for the terminal, or the Node SDK for
opening tunnels from code. Binaries are published for macOS, Linux, and
Windows on amd64 and arm64.
CLI
The one-liner detects your OS and architecture, downloads the matching binary,
verifies its SHA-256 checksum, and puts osmrouter on your PATH:
curl -fsSL https://osmrouter.com/install.sh | shVerify:
osmrouter versionIn PowerShell, run:
irm https://osmrouter.com/install.ps1 | iexThis installs osmrouter.exe to %LOCALAPPDATA%\osmRouter\bin and adds it to
your user PATH (restart your terminal to pick it up). You can also use WSL with
the macOS/Linux one-liner, or the Node SDK.
Download the binary for your platform from the
releases page and put it on your
PATH. Checksums are published in checksums.txt.
# macOS / Linux
chmod +x osmrouter-darwin-arm64
sudo mv osmrouter-darwin-arm64 /usr/local/bin/osmrouter
osmrouter versionThe installers verify the download against the published SHA-256 checksum and
abort on a mismatch. Override the install location with OSM_BINDIR, or pin a
version with OSM_VERSION.
Node SDK
Open a tunnel from a Node script or test harness. The SDK vendors the same client binary and downloads the right one on install.
npm install @omsapi/osmrouterimport { connect } from "@omsapi/osmrouter";
const tunnel = await connect({
port: 8080,
token: process.env.OSM_TOKEN,
subdomain: "my-app", // optional — random if omitted
});
console.log(`Public URL: ${tunnel.url}`);
// ... later
await tunnel.close();See the Node SDK reference for the full API.
Authenticate
However you run it, the client authenticates with an agent token. Create one under Tokens in the dashboard and export it:
export OSM_TOKEN=osm_xxxxxAdd the export to your shell profile to persist it across sessions.
Next steps
- Quickstart — open your first tunnel.
- CLI reference — every command, flag, and environment variable.