File size: 504 Bytes
a02272f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""brain detach — Remove the workspace runtime connection."""

import shutil
import typer

from brain.paths import get_workspace_dir
from brain.utils.display import error, success


def detach() -> None:
    """Remove the .brain/ workspace runtime. Does NOT delete project memory."""
    workspace = get_workspace_dir()

    if not workspace.exists():
        error("No workspace runtime found.")
        raise typer.Exit(code=1)

    shutil.rmtree(workspace)
    success("Workspace runtime removed.")