Core Module for Runex – Technical Overview

This document explains how the core module (core.py) works. It focuses on what each function does and clearly explains the difference between “only structure” mode (the -s flag) and the default mode that includes file contents.


1. Text-Based Output Functions

These functions generate a plain text view of the project directory.

build_tree

generate_folder_structure

append_file_contents


2. JSON-Based Output Functions

These functions produce a JSON representation of the project structure.

build_tree_data

append_file_contents_data


3. Public API: generate_prompt


Integration with Git’s .gitignore Rules


Conclusion