So here's what kept bugging me. I'm working on a project, I need ChatGPT to help me fix something, and I start copying files into the chat. One file, paste, another file, paste. By the fifth file I'm already annoyed. And half the time I forget to include something important.
I figured I'd write a quick script to just merge the files I need into one .txt. It turned out more useful than I expected, so I cleaned it up and put it on GitHub.
It's called FileCLI. You run it, give it a folder, it shows you all the files. You type the numbers of the ones you want, press 0, done. One .txt file with everything separated cleanly.
The part I actually use the most is the memory. It remembers what I picked last time for each folder. So when I come back to the same project a week later, my selection is already there.
Some other stuff it does:
You can drag a folder straight into the terminal instead of typing the path. Works on Windows, Linux, Mac, even Termux on my phone.
It handles ZIP files. Just drop one in and it'll unpack it and let you pick files from inside.
It figures out the encoding automatically. UTF-8, UTF-16, CP1251, CP1252. Useful when you have old files with weird encodings.
Skips all the junk on its own. No node_modules, no .pyc files, no images, no binaries in your output.
Settings (where to save, language) open in a little floating menu with mouse support. That's the only "fancy" part, everything else is just typing numbers.
No dependencies at all, just Python 3.8 or newer. There's a simpler version without the floating menu for Termux.
Three languages: English, Russian, Chinese.
https://github.com/Datvex/FileCLI
If you end up trying it let me know what you think. Or if there's something you'd want it to do differently.
Top comments (0)