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.
| opt_url |
Optional URL from command line (required if config not loaded) |
| opt_api_key |
Optional API key from command line |
| Error |
if config not loaded and URL not provided, or connection test fails |