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.
| Precedence | api | default chain | timeout |
|---|---|---|---|
| 1. Flag | --api <url> | --chain <slug> | --timeout <ms> |
| 2. Environment | SPECTRUM_API | n/a | n/a |
| 3. Config file | api | defaultChain | timeout |
Config file
The config file lives at:
~/.config/spectrum/config.jsonon Linux and macOS (respectsXDG_CONFIG_HOME)%APPDATA%\spectrum\config.jsonon 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 pathEnvironment 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 ETHPer-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 5000Token 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.