mufeedvh / code2prompt

A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
MIT License
1.45k stars 77 forks source link

I want to exclude files and directories listed in .gitignore #25

Closed yasainet closed 2 months ago

yasainet commented 2 months ago

I want to exclude files and directories listed in .gitignore

node_modules/ venv/

I've specified them in .gitignore as above, but code2prompt reads them without excluding them.

Should I specify them directly using --exclude?

In that case, should I specify --exclude /**/node_modules/, /**/venv/?

I look forward to your reply.

mufeedvh commented 2 months ago

Nope, .gitignore should work, I just tested it and can confirm that it works even if the .gitignore file is nested. I am closing this issue but if you can provide your directory structure (tree command output), I can take a look at this again. Thank you!