Superbridge
Start typing to search...

Getting Started

CLI

A command-line interface for the Superbridge API

The Superbridge CLI is a command-line wrapper around the Superbridge API and SDK. Read-only endpoints are exposed as subcommands; on-chain execution is funnelled through a single execute command that handles approvals, the initiating transaction, indexing, gasless intent submission, and step polling for you.

Installation

Install globally to get the superbridge binary on your PATH:

npm install -g @superbridge/cli

Or run a one-off without installing:

npx @superbridge/cli chains

Every example in these docs uses the globally-installed superbridge binary, but you can prefix any command with your package manager's runner (npx, pnpm dlx, yarn dlx, bunx) to run it without installing.

Quick Start

Set your API key as an environment variable, then run any read-only command:

export SUPERBRIDGE_API_KEY=sb_live_...

superbridge health
superbridge chains
superbridge tokens --chain-key eth --search USDC

Every command pretty-prints to stdout by default — tables for lists, formatted summaries for single objects. To get raw JSON instead (for piping into jq or other tools), pass --output json:

superbridge chains --mainnets --output json | jq '.[] | {key, name, chainId}'

Conventions

  • Human format on stdout, status on stderr. Output is pretty-printed by default; pass --output json to get raw JSON. Progress messages and errors always go to stderr, so piped JSON output stays clean.
  • Env first, flags override. Anywhere you can pass --api-key, the corresponding SUPERBRIDGE_API_KEY env var works too. The flag wins if both are set.
  • Body-heavy commands accept inline, file, or stdin. routes accepts an inline JSON string, @path/to/file.json to read from a file, or - to read from stdin. Individual flags override fields from the body.

Next Steps

  • Authentication — API keys and private keys for signing.
  • Commands — full command reference.
  • Examples — end-to-end workflows including executing a route.