ensure_config


Description:

protected async void ensure_config (string? opt_url = null, string? opt_api_key = null) throws Error

Ensures config exists and is loaded. Creates config if it doesn't exist, and sets up connection from CLI args if needed. Tests the connection but doesn't save config until after all checks are complete.

Parameters:

opt_url

Optional URL from command line (required if config not loaded)

opt_api_key

Optional API key from command line

Exceptions:

Error

if config not loaded and URL not provided, or connection test fails