Skip to content

Conversation

@lins05
Copy link

@lins05 lins05 commented Aug 24, 2025

This PR implements .promptignore file support, allowing users to exclude files from LLM prompts without affecting version control.

Also supports arbitrary ignore files through new flag -E,--extra-ignore-files

Typical use case: to exclude assets (images etc. and generated code) from the output.

  • These files need to be tracked by git, but no need to send to LLM

Why the the existing support for .ignore is not enough?

  • It serves different purpose: If we put files in .ignore, it would make them ignored by searchers like silver searcher and rg
  • No global ~/.ignore support

Implementation

This pull request adds support for .promptignore and custom ignore files to provide more flexible file filtering.

Key features:

  • .promptignore Support: Automatically respects local and global .promptignore files.
  • Custom Ignore Files: Use other ignore files like .dockerignore via the --extra-ignore-files flag.
  • Disable .promptignore: A --no-promptignore flag has been added to bypass this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant