Expand description
Remote configuration fetching.
Fetches TOML configuration from a remote URL and merges it with the local config. This provides a generic mechanism for centralized configuration management — any server can serve TOML config over HTTP with Bearer auth.
§Configuration
Via config.toml:
[remote_config]
url = "https://example.com/api/devboy-config"
token_key = "remote_config.token"Via environment variables (take priority over config file):
DEVBOY_REMOTE_CONFIG_URL— URL to fetch config fromDEVBOY_REMOTE_CONFIG_TOKEN— Bearer token for authentication
§Behavior
- Remote values override local values (remote wins)
- If fetch fails, a warning is printed and local config is used unchanged
- Timeout: 10 seconds
- Response must be valid TOML that deserializes into
Config
Functions§
- fetch_
and_ merge local_config- The locally loaded configtoken_from_keychain- Optional token resolved from keychain viatoken_key- redact_
url_ for_ display - Redact a URL for safe display in diagnostic messages: drop userinfo
(basic-auth credentials in
https://user:pass@host/...) and any query string or fragment. Scheme + host + port + path are preserved. - resolve_
url - Fetch remote config and merge it into the provided local config.