Skip to content

Instantly share code, notes, and snippets.

@gWOLF3
Created March 9, 2025 17:31
Show Gist options
  • Save gWOLF3/8a273423ec2b044de37f132f14500e79 to your computer and use it in GitHub Desktop.
Save gWOLF3/8a273423ec2b044de37f132f14500e79 to your computer and use it in GitHub Desktop.
scat or "super cat" ; for providing LLMs folder file context
scat() {
local dir="${1:-.}"
find "$dir" \
-type d -exec echo -e "Directory: {}\n" \; -o \
-type f \
\( -name "*.js" -o -name "*.json" -o -name "*.html" -o -name "*.css" -o -name "*.md" -o -name "*.txt" \) \
-exec echo -e "\n=== File: {} ===\n" \; \
-exec cat {} \; \
-exec echo -e "\n--- End of File ---\n" \;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment