Created
September 29, 2024 10:01
-
-
Save cpietsch/4ea82867236d1a1cc4a6e42bd1801b43 to your computer and use it in GitHub Desktop.
bash command to recursive combine js/ts files into one file to use as context for LLMS like GPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find path/to/folder -type f \( -name "*.(js|ts)" -o -name "*.ts" \) -print0 | | |
while IFS= read -r -d '' file; do | |
echo "## $(basename "$file")" | |
cat "$file" | |
done | |
} > codebase.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment