repomix icon indicating copy to clipboard operation
repomix copied to clipboard

Exclude variables in specific files

Open PaulRBerg opened this issue 8 months ago • 2 comments

Description

It'd be helpful to have the ability to ignore variable patterns in specific files as opposed to files wholesale.

PaulRBerg avatar Jun 22 '25 20:06 PaulRBerg

Hi, @PaulRBerg ! Thanks for the feature request!

Could you share some specific use cases where this would be helpful? What types of files and variable patterns are you working with?

I’m thinking the config might look something like this:

{
  "ignore": {
    "customPatterns": ["node_modules/**"],
    "contentPatterns": {
      "**/*.env": ["*_SECRET=*", "*_PASSWORD=*"],
      "config/**/*.js": ["apiKey:", "secretKey:"]
    }
  }
}

Where if a file matches the file pattern AND contains any of the specified content patterns, the entire file gets excluded.

Would this approach work for your use case?

yamadashy avatar Jul 11 '25 12:07 yamadashy

yeah, your example is spot-on

PaulRBerg avatar Jul 11 '25 20:07 PaulRBerg