Script that grabs all text from files in a folder, wraps it up, and preps it for AI. No more copy-paste nightmares.
export4ai_demo.mp4
Need to feed text files to an external AI chatbot? This script does it in seconds. Helpful for iterative back-and-forth.
Save time, look cool.
git clone https://github.com/pa1ar/export4ai
- Add to
~/.zshrcor~/.bashrc:alias 4aiexport='python /path/to/4aiexport.py'
- Reload:
source ~/.zshrcorsource ~/.bashrc.
Assuming you in the right folder (your project or whatever).
-
basic:
4aiexport .- Export all text files in the current dir.
-
exclude junk:
4aiexport . -x node_modules -x README.md- Skip these.
-
specific files:
4aiexport file1.txt file2.py- Just these.
- if you want to copy the output to clipboard, add
| pbcopyat the end of the command - you can modify the wrapping of the script in the
4aiexport.pyfile to your liking
That is all.