The BGP Glass CLI

Run ping, traceroute, mtr, and BGP route lookups from your locations without leaving the terminal. A single static binary, no runtime.

Install

Quick install (Linux / macOS · amd64 + arm64)

curl -fsSL https://bgpglass.com/cli/install.sh | sh

From source (Go)

go install github.com/bgpglass/cli/cmd/bgpglass@latest

Authenticate

Create an API token in your portal (API section) and export it:

export BGPGLASS_TOKEN=your-token
export BGPGLASS_HOST=your-org.bgpglass.com   # your looking glass host

Usage

# run a ping from the "frankfurt" location
bgpglass run ping 1.1.1.1 --from frankfurt

# traceroute, waiting for the result
bgpglass run traceroute example.com --from london

# fetch a previous measurement by id
bgpglass get 01J...

# cached latency for all your locations, as JSON
bgpglass latency

Use it in CI

A GitHub Action wraps the CLI so a workflow can gate on reachability — the step fails if the measurement fails.

- uses: bgpglass/cli/github-action@v1
  with:
    host: your-org.bgpglass.com
    token: ${{ secrets.BGPGLASS_TOKEN }}
    method: ping
    target: 1.1.1.1
    from: frankfurt

Action reference & examples →

The CLI is a thin client over the REST API — anything it does, you can do with a token and curl.

Run your first query from the terminal

Create an account, add a location, and drive it all from the CLI. Free to start, no credit card.