CLI
The nxthdr CLI is a command line tool to interact with the nxthdr platform. It supports authentication, peering operations, and probing credits management.
Source code: github.com/nxthdr/cli
Installation
Install from crates.io using Cargo:
cargo install nxthdrAuthentication
All commands that interact with the platform require authentication. The CLI uses the Auth0 device authorization flow.
Login
nxthdr loginThis will display a URL and a code. Open the URL in your browser and enter the code to authenticate. Tokens are stored locally and refreshed automatically when expired.
Logout
nxthdr logoutRemoves stored tokens from your system.
Status
nxthdr statusDisplays your current authentication state and token expiration time.
Probing
Commands to interact with the probing platform (Saimiris).
Credits
nxthdr probing creditsDisplays your daily probing credits usage. Each probe you send consumes one credit. The daily limit resets at midnight UTC.
Example output:
Probing credits (today):
Used: 1500
Limit: 10000
Remaining: 8500Peering
Commands to interact with the peering platform (PeerLab).
Get your ASN
nxthdr peering asnDisplays your assigned private ASN. An ASN is automatically assigned on first use.
Prefix management
List your active prefix leases:
nxthdr peering prefix listRequest a new /48 IPv6 prefix lease (duration in hours, 1 to 24):
nxthdr peering prefix request 12Revoke an existing prefix lease:
nxthdr peering prefix revoke 2a06:de00:5b::/48PeerLab environment
Generate a .env file for PeerLab with your ASN and active prefixes:
nxthdr peering peerlab env > .envVerbosity
All commands support a --verbose flag (or -v) to increase log output. Use -vv for debug level.
nxthdr -v probing creditsEnvironment Variables
| Variable | Description | Default |
|---|---|---|
NXTHDR_API_URL |
PeerLab API base URL | https://peerlab.nxthdr.dev |
NXTHDR_SAIMIRIS_API_URL |
Saimiris Gateway base URL | https://saimiris.nxthdr.dev |
NXTHDR_CLIENT_ID |
Auth0 client ID | Built in default |