Skip to Content
CLIConfiguration

Configuration

The CLI needs an API URL (which embeds your tenant token) and optionally a default chain and timeout. Each setting resolves independently, highest precedence first.

Precedenceapidefault chaintimeout
1. Flag--api <url>--chain <slug>--timeout <ms>
2. EnvironmentSPECTRUM_APIn/an/a
3. Config fileapidefaultChaintimeout

Config file

The config file lives at:

  • ~/.config/spectrum/config.json on Linux and macOS (respects XDG_CONFIG_HOME)
  • %APPDATA%\spectrum\config.json on Windows

Run spectrum config path to print the exact location.

Managing settings

spectrum config set api https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/spectrumapi/v1/ spectrum config set default-chain ethereum spectrum config set timeout 30000 spectrum config get api spectrum config list spectrum config path

Environment variable

Set SPECTRUM_API to supply the API URL without writing it to the config file. This is useful in CI or containers:

export SPECTRUM_API=https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/spectrumapi/v1/ spectrum prices price ETH

Per-invocation override

Any setting can be overridden for a single command with a flag, which takes precedence over both the environment and the config file:

spectrum core block-height --chain base --api https://... --timeout 5000

Token security

Your tenant token is part of the API URL, so the CLI treats it as a secret:

  • On Linux and macOS the config file is written with owner-only permissions (0600). On Windows it lives in your user profile under %APPDATA%.
  • The token is masked whenever the URL is printed (config list, error messages) and is never logged.