"""ever-brain use — Activate a Brain Instance globally.""" import typer from brain.config import set_active_brain from brain.paths import get_brain_path from brain.utils.display import error, success def use(name: str = typer.Argument(..., help="Name of the Brain Instance to activate")) -> None: """Set the active Ever Brain Instance globally (system-wide).""" brain_path = get_brain_path(name) if not brain_path.exists(): error(f"Ever Brain instance '{name}' not found.") error(f"Expected at: {brain_path}") raise typer.Exit(code=1) set_active_brain(brain_path) success(f"Active Ever Brain set to '{name}'.")