Doctor
mapbox doctor is where to start when requests fail and you don't yet
know why: a missing or unexpected token, or a network, proxy or firewall in
the way. mapbox auth whoami
answers which token the next command will use; doctor answers the rest
of what commonly goes wrong before a real command finds out the hard way.
mapbox doctor
A read-only snapshot of what the next command would see: which token wins
and its state, which proxy environment variables you've set, and where the
update-check and telemetry switches stand. It sends nothing unless
--verify asks for the one check that needs a request.
Proxy names which of HTTPS_PROXY, HTTP_PROXY, ALL_PROXY and
NO_PROXY exist, in upper- or lowercase. It answers "is a proxy variable
set", not "would this request use one": NO_PROXY can exempt
api.mapbox.com, and on macOS a proxy configured only in system network
settings isn't visible here even though requests still use it.
Under -o json, telemetry is on only when both switches.telemetry_allowed
(the MAPBOX_CLI_NO_TELEMETRY environment variable) and
switches.telemetry_persisted (mapbox config set telemetry)
are true.
Parameters:
| Parameter | Description |
|---|---|
--verify | Also check that api.mapbox.com is reachable, through the same client and proxy handling every other request uses. Adds a Reachable line (a connectivity object in JSON). Honors --timeout/MAPBOX_TIMEOUT, and defaults to 5 seconds when you set neither. |
Examples:
mapbox doctor
mapbox doctor --verify
mapbox doctor -o json