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

Add only specific files #21

Closed Jiayou-Chao closed 3 months ago

Jiayou-Chao commented 3 months ago

Can I just add specific files like code2prompt add file1,file2? This feature would be great.

ODAncona commented 3 months ago

@Jiayou-Chao I implemented this feature in #20 using glob pattern, thus providing a similar api as tar or rsync.

You can use it like this :

code2prompt path/to/codebase --include="*.rs,*.toml,**/rel/path/to/file1.png"
Jiayou-Chao commented 3 months ago

Thanks. This is even better.

mufeedvh commented 3 months ago

Fixed in #20 by @ODAncona! 🙌 🎉