Skip to main content

Access Token

The CLI needs an access token to authenticate with S2. Generate one from the dashboard, then persist it:
s2 config set access_token YOUR_ACCESS_TOKEN

Managing Config

# List all config values
s2 config list

# Get a specific value
s2 config get access_token

# Unset a value
s2 config unset access_token

Environment Variables

The CLI also reads endpoint overrides from environment variables, which is useful when pointing at s2-lite:
VariableDescription
S2_ACCESS_TOKENAccess token (alternative to s2 config set)
S2_ACCOUNT_ENDPOINTAccount-level API endpoint
S2_BASIN_ENDPOINTBasin-level API endpoint
# Example: pointing at a local s2-lite instance
export S2_ACCOUNT_ENDPOINT="http://localhost:8080"
export S2_BASIN_ENDPOINT="http://localhost:8080"
export S2_ACCESS_TOKEN="ignored"