simonw / files-to-prompt

Concatenate a directory full of files into a single prompt for use with LLMs
Apache License 2.0
488 stars 43 forks source link

Add ability to ignore patterns directly from cli #4

Closed dipam7 closed 6 months ago

dipam7 commented 6 months ago

Solves https://github.com/simonw/files-to-prompt/issues/1

simonw commented 6 months ago

I applied your changes by downloading the .diff for this PR:

wget 'https://patch-diff.githubusercontent.com/raw/simonw/files-to-prompt/pull/4.diff'

And then prompting it to apply those changes to the latest main like this:

files-to-prompt 4.diff files_to_prompt/cli.py tests/test_files_to_prompt.py | \
  llm -m opus --system 'Apply the change described in the diff to the project - return updated cli.py and tests'

That didn't get it right so I ran this:

llm -c 'you undid the change where it could handle multiple paths - I want to keep that, I only want to add the new --ignore-patterns option'

Transcript: https://gist.github.com/simonw/8b8394e320c895c792736e7e85c40c23

simonw commented 6 months ago

I'm going to rename the option to --ignore, refs #1