Skip to content

Instantly share code, notes, and snippets.

@shaayaansayed
shaayaansayed / flatten_repo.py
Created April 24, 2024 21:06
CLI tool to flatten a repo by merging its files into a single text file. Useful for feeding into LLMs to ask questions about the codebase.
"""
GitHub Repo Flattener
This CLI tool flattens a GitHub repository by merging its files into a single text file. Useful for feeding into LLMs to ask questions about the codebase.
Features:
- Flatten a GitHub repository into a single text file
- Specify which file types to include (e.g., skip certain files like .md)
- List all file types in the repository before flattening (helpful for large repositories)