Longbridge Developers
Get Started

Installation

Install the CLI and authenticate with your Longbridge account.

Source code and release binaries: longbridge/longbridge-terminal

Install

brew install --cask longbridge/tap/longbridge-terminal
curl -sSL https://open.longbridge.com/longbridge/longbridge-terminal/install | sh
scoop install https://open.longbridge.com/longbridge/longbridge-terminal/longbridge.json
iwr https://open.longbridge.com/longbridge/longbridge-terminal/install.ps1 | iex

auth

Manage authentication — login, logout, and check token status.

auth login

Authenticate via OAuth 2.0 device authorization flow — works in any environment including SSH and headless servers.

longbridge auth login

Running auth login prints a URL and a short code. Open the URL in any browser, enter the code, and authorize. The token is saved to ~/.longbridge/openapi/tokens/<client_id> and reused automatically by all subsequent commands.

If no browser is available, generate an Agent Auth Code at https://open.longbridge.com/connect and redeem it directly:

longbridge auth login --auth-code 6vYzXq3WbKp9TmHd

auth logout

Clears the stored OAuth token. The next command or TUI launch will trigger re-authentication.

longbridge auth logout

auth status

Shows token validity locally — no network required. Displays expiry time, login time, account info, and current quote level.

longbridge auth status
longbridge auth status --format json

check

Verifies token validity and API connectivity. Shows token status, cached region, and latency to both Global and CN API endpoints. Does not require an active market session.

longbridge check
longbridge check --format json

update

Downloads and runs the official install script to replace the current binary with the latest release.

longbridge update