SourceFold is a utility tool that collapses an entire codebase into a single file. This is especially useful for feeding source code into AI models or LLMs that require full context in a linear, compact format.
- Upload your codebase and get all the files combined into a single markdown file.
- Upload it to Qwen or any other AI model.
- The AI now understands your entire codebase context.
- Recursively reads project directories
- Concatenates all source files into one unified file
- Preserves relative file paths and boundaries as comments
- Supports multiple programming languages
- Ignores unnecessary files and folders (e.g.,
.git,node_modules,__pycache__, etc.) - Now includes CLI support for direct terminal usage
- Feed complete codebase context to AI/LLM
- Analyze project structure in a single glance
- Archive source code in a simplified format
- Assist in static code analysis pipelines
- Generate unified markdown files directly via CLI
git clone https://github.com/0xAungkon/SourceFold.git
cd SourceFold
pip install -r requirements.txt
make startOr use Docker:
docker compose up -dAccess the app at: http://localhost:8000
You can now use SourceFold directly from the command line.
sudo wget -O /bin/sourcefold-cli https://raw.githubusercontent.com/0xAungkon/SourceFold/refs/heads/main/sourcefold-cli.py
sudo chmod +x /bin/sourcefold-clisourcefold-cli --output .docs/combined_code.md --folders src,test --extensions .jsx,.jscurl -s https://raw.githubusercontent.com/0xAungkon/SourceFold/refs/heads/main/sourcefold-cli.py | python3 - --output /tmp/combined_codebase.md --folders src,test --extensions .py,.htmlMIT License © 2025 0xAungkon

