mempalace.room_detector_local
Source: mempalace/room_detector_local.py
room_detector_local.py — Local setup, no API required.
Two ways to define rooms without calling any AI:
- Auto-detect from folder structure (zero config)
- Define manually in mempalace.yaml
No internet. No API key. Your files stay on your machine.
Functions
detect_rooms_from_folders
python
def detect_rooms_from_folders(project_dir: str) -> listWalk the project folder structure. Find top-level subdirectories that match known room patterns. Returns list of room dicts.
detect_rooms_from_files
python
def detect_rooms_from_files(project_dir: str) -> listFallback: if folder structure gives no signal, detect rooms from recurring filename patterns.
print_proposed_structure
python
def print_proposed_structure(project_name: str, rooms: list, total_files: int, source: str)get_user_approval
python
def get_user_approval(rooms: list) -> listSame approval flow as AI version.
save_config
python
def save_config(project_dir: str, project_name: str, rooms: list)detect_rooms_local
python
def detect_rooms_local(project_dir: str, yes: bool = False)Main entry point for local setup.
