Config and offline mode¶
You can provide network settings through a JSON config file and optionally combine that with environment variables or CLI flags.
Config file shape¶
--config-file expects a JSON object. The network field, when present, must also be an object.
Example:
{
"network": {
"timeout": 20.0,
"retries": 4,
"backoff_factor": 0.5,
"cache_dir": ".trustcheck-cache"
}
}
Environment variables¶
The CLI also recognizes these environment variables:
TRUSTCHECK_TIMEOUTTRUSTCHECK_RETRIESTRUSTCHECK_BACKOFFTRUSTCHECK_CACHE_DIRTRUSTCHECK_OFFLINE
Precedence¶
The effective network configuration is resolved from:
- CLI flags
- environment variables
- config file values
- built-in defaults
Offline mode¶
Use --offline when you want trustcheck to use cached responses only and avoid live network requests.
Example:
trustcheck inspect sampleproject \
--version 4.0.0 \
--cache-dir .trustcheck-cache \
--offline
Offline mode is useful in hermetic CI or for repeated local analysis after an initial cached run.