Give your Ai assistant a map of your project
One of the things I am really bad at is deciding where to put a file in a project. I realized that I can let AI solve that for me by giving it more context on the project with a map of the project or a specific folder. I like to use tree to get this.
Using tree
In Aider I /run tree -I node_modules
and add it to the chat. Then I /ask
Aider where to put the file I want to create.
This is what the tree output looks like from the command above. -I
is ignore.
Using ls
If you don’t have tree installed you can do this with ls -R1
which will list all the files in a single column.
Misc Terminal ways
Unfortunately macOs terminal ls
command can’t exclude files or directories. However these commands can.
**ls + grep **
**find **
Another alternative for macOs is to install the GNU coreutils
gls