src.config.config_loader module
Centralized configuration loader for Marcus.
This module provides a single source of truth for loading configuration
from marcus.config.json with support for environment variable overrides.
Supports both legacy single-project and new multi-project configurations.
-
class src.config.config_loader.ConfigLoader[source]
Bases: object
Singleton configuration loader for Marcus.
-
static __new__(cls)[source]
Create or return singleton instance.
- Return type:
ConfigLoader
-
__init__()[source]
Initialize the config loader.
- Return type:
None
-
get(path, default=None)[source]
Get a configuration value using dot notation.
- Parameters:
path (str) â Dot-separated path to the config value (e.g., âkanban.providerâ)
default (Any) â Default value if path doesnât exist
- Returns:
The configuration value or default
- Return type:
Any
-
get_feature_config(feature)[source]
Get feature configuration with backward compatibility.
Supports both old boolean format and new object format:
- Old: âeventsâ: true
- New: âeventsâ: {âenabledâ: true, âstore_historyâ: true}
- Parameters:
feature (str) â Feature name (events, context, memory, visibility)
- Returns:
Feature configuration dictionary
- Return type:
Dict[str, Any]
-
get_kanban_config()[source]
Get the complete kanban configuration for the selected provider.
- Return type:
Dict[str, Any]
-
get_ai_config()[source]
Get the complete AI configuration.
- Return type:
Dict[str, Any]
-
get_monitoring_config()[source]
Get the complete monitoring configuration.
- Return type:
Dict[str, Any]
-
get_communication_config()[source]
Get the complete communication configuration.
- Return type:
Dict[str, Any]
-
get_hybrid_inference_config()[source]
Get the hybrid inference configuration.
- Return type:
Any
-
is_multi_project_mode()[source]
Check if config is in multi-project mode.
- Return type:
bool
-
get_projects_config()[source]
Get all project configurations.
- Return type:
Dict[str, Any]
-
get_active_project_id()[source]
Get the active project ID.
- Return type:
Optional[str]
-
get_provider_credentials(provider)[source]
Get credentials for a specific provider.
- Return type:
Dict[str, Any]
- Parameters:
provider (str)
-
reload()[source]
Reload the configuration from disk.
- Return type:
None
-
property config_path: Path
Get the path to the loaded config file.
-
__repr__()[source]
Return string representation of ConfigLoader.
- Return type:
str
-
src.config.config_loader.get_config()[source]
Get the global config loader instance.
- Return type:
ConfigLoader
-
src.config.config_loader.get_config_value(path, default=None)[source]
Get a configuration value using dot notation.
- Return type:
Any
- Parameters:
-
-
src.config.config_loader.get_kanban_provider()[source]
Get the configured kanban provider.
- Return type:
str
-
src.config.config_loader.get_anthropic_api_key()[source]
Get the Anthropic API key.
- Return type:
Optional[str]
-
src.config.config_loader.get_planka_config()[source]
Get Planka configuration.
- Return type:
Dict[str, Any]