fagg is a powerful and safe CLI tool designed to recursively scan directories and aggregate file contents into a single file. It is optimized for feeding project context to Large Language Models (LLMs), performing code reviews, or creating project documentation snapshots.
- Read-Only Safety: Specifically designed to NEVER modify your source files.
- Filtering: Whitelist/blacklist by extension, exclude directories, or use glob patterns.
- Smart Limits: Set maximum file size, token budgets, or cap lines per file.
- Git Integration: Respects your .gitignore\ rules automatically.
- Interactive Mode: Select files visually using \zf.
- Multiple Formats: Output as plain text, Markdown (with syntax highlighting), or JSON.
- LLM Ready: Built-in token estimation and output splitting to stay within context limits.
- Download the \�ggregator.sh\ script.
- Make it executable: \\�ash chmod +x aggregator.sh \3. (Optional) Alias it for easy access: \\�ash alias fagg='./aggregator.sh' \
\\�ash ./aggregator.sh ./my-project output.txt \
\\�ash ./aggregator.sh ./src context.md -f markdown --tree --toc --stats --tokens \
\\�ash ./aggregator.sh ./project output.txt --max-tokens 50000 \
\\�ash ./aggregator.sh ./project output.txt --interactive \
This project is licensed under the MIT License.