A zero-footprint, stateless desktop utility designed to scan, parse, and bundle complex directories or selected source files into unified, clean documents (Markdown, Plain Text, or JSON). Optimized for compiling large codebases, nested repositories, or single source files into easily parsable structures for LLM indexing, auditing, or archiving.
- Dynamic
.gitignoreParsing
Automatically discovers and parses standard.gitignoreglob patterns inside your target directory. Converts them to compiled regular expressions on-the-fly to filter dependencies, temporary caches, and non-source files automatically. - Flexible Source Target Selection
Supports selecting an entire folder (recursively scanning all subdirectories), a single file, or multiple files simultaneously. - Automatic Binary Asset Detection
Inspects initial file byte chunks for null bytes (\x00) to safely bypass compiled binaries, images, and archives, preventing output bundle text corruption. - Non-Blocking Multi-Threaded Engine
Decoupled file scanning and processing executes inside an asynchronousthreading.Thread. This prevents the GUI from hanging or freezing when traversing heavy repositories. - Dark AMOLED & High-Contrast RGB Neon Interface
Styled with a pure#000000AMOLED background, high-contrast white text, and sharp RGB neon borders (Cyan, Purple, Pink) for maximum visual legibility. - Windows OS Immersive Title Bar
Directly invokes Windows Desktop Window Manager (DWM) APIs to render the OS window title bar in pure AMOLED black with crisp white caption text.
SOURCECRAFT-PROJECT-BUNDLER/
├── main.py # Primary application entrypoint
├── build.py # Automated compiler & auto-cleanup script
├── .gitignore # Prunes build directories from Git tracking
├── README.md # Technical documentation and guide
└── src/
├── __init__.py # Python package marker
├── app.py # Main GUI application window class
├── components.py # RGB UI components & filter modal dialog
├── config.py # Theme palette tokens & DWM titlebar API
├── engine.py # Multi-target compilation engine
└── gitignore.py # Dynamic .gitignore glob parser
The application utilizes Python standard library components and can be launched directly with zero external dependencies.
python main.pypython .\main.pypython3 main.pyYou can compile this project into a standalone, single-file Windows executable (SourceCraft.exe) with automated cleanup of temporary build artifacts.
- Install PyInstaller:
pip install pyinstaller
- Run the automated build script:
python build.py
- Locate your executable at
dist/SourceCraft.exe. All temporarybuild/directories,.specfiles, and__pycache__artifacts are automatically deleted upon completion.
- Markdown (
.md): Separates code files with headers and clean code-block wrappers matching file extensions (e.g.,pythonorcs). Ideal for LLM prompt injections. - Plain Text (
.txt): Bundles entries with clean structural horizontal separation boundaries. - JSON (
.json): Formats files into structured key-value arrays along with processing metadata parameters.