File size: 670 Bytes
279ebac
a02272f
 
 
 
 
 
 
 
 
279ebac
a02272f
 
 
279ebac
a02272f
 
 
 
279ebac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""ever-brain use <name> — 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}'.")