file_tree.py

LunaEngine File Tree Exporter
Generates a text-based tree of the project structure, ignoring specified
directories and files. Useful for sharing context with LLMs/AIs.

Global Functions

def should_ignore(path: Path, ignore_dirs: Set[str], ignore_file_patterns: Set[str]) -> bool

Return True if the path should be excluded.

def generate_tree_lines(root: Path, prefix: str = '', ignore_dirs: Set[str] = DEFAULT_IGNORE_DIRS, ignore_file_patterns: Set[str] = DEFAULT_IGNORE_FILE_PATTERNS, max_depth: int = -1, current_depth: int = 0) -> List[str]

Recursively build the tree as a list of strings.
Directories are listed first, then files (both sorted alphabetically).

def main() -> Any

No documentation

Back to Tools Module