5 ms·
I use the following for feeding into AI find . -print -exec cat {} \; -exec echo \; Which will return for each file (and subfolders) the filename and then
by crisbal_ 2y ago
I use the following for feeding into AI
find . -print -exec cat {} \; -exec echo \;
Which will return for each file (and subfolders) the filename and then the content of the file.
Then `| pbcopy` to copy to clipboard and paste it into ChatGPT or similar.
- DrPhish 2y agoThat's very nice and compact. I do the same with a short bash script, but wrap each file in triple-backticks and attempt to put the correct language label on each eg: Filename: demo.py ```python ...python code here... ```
- mbonnet 2y agoMind sharing the script?
- jzombie 2y agoI have something similar. https://github.com/jzombie/globcat.sh https://github.com/jzombie/globcat.sh Nothing fancy, but gets the job done.
- genewitch 2y agoSeconded because just having something autowrapped like that and putting the clipboard would save me time: release the snyder cut, er, bash script!
- singpolyma3 2y agoI guess this only works for very small codebase?
- OsrsNeedsf2P 2y agoCorrect, but it's the same as what OP shared. You should use Aider/Cursor for proper indexing/intelligent codebase referencing
- boredemployee 2y agonot sure if it's cursor's fault, but very often it doesn't give me the real or complete code of my codebase when auto editing/auto completing. any tips?
- soco 2y agoI'm still puzzled how come people are convinced by Cursor, while my experience was meh at best. Can it index your stuff? okay it can. Can it refactor a simple function? No it cannot, it can't even rename a damn Java class. How can I trust it to generate then code based on my codebase? So, what is your use case then? Or can anybody point me to some blog/articles/videos showing some real use cases for Cursor? Real as in, something that it provenly can do?
- risyachka 2y agoI think you know the correct answer:)
- soco 2y agoI hoped to be wrong but no comment so far even tried to bring a based argument... eh, maybe I'll try again in a year.
- jcgrillo 2y agoCorrect. It's Web 3.0 2.0. You're supposed to play along to make the stock prices go up and to the right.
- astar1 2y ago>Java found the problem
- kristiandupont 2y ago>Can it refactor a simple function? Certainly, I do that several times a day.
- 2y ago
- deleted 2y ago[deleted]
- usagisushi 2y agoOr, for a lazier approach: $ head -10000 * ==> package.json <== { "name": ... ... ==> tsconfig.json <== { "extends": ... ... $ head -10000 * | llm -s "generate a patch to switch this project to esm"
- mohsen1 2y agoyek makes it a bit quicker and you can do all your piping with it: https://github.com/bodo-run/yek https://github.com/bodo-run/yek