Skip to content

Feat/excluded patterns#54

Merged
georgeh0 merged 2 commits intococoindex-io:mainfrom
RubenFricke:feat/excluded-patterns
Mar 13, 2026
Merged

Feat/excluded patterns#54
georgeh0 merged 2 commits intococoindex-io:mainfrom
RubenFricke:feat/excluded-patterns

Conversation

@RubenFricke
Copy link
Contributor

@RubenFricke RubenFricke commented Mar 12, 2026

See #45

Changes

Add support for COCOINDEX_CODE_EXCLUDED_PATTERNS.
Users can now provide additional glob patterns to exclude from indexing via an environment variable as a JSON array.

Example:

COCOINDEX_CODE_EXCLUDED_PATTERNS='["**/migration.sql", "**/*.d.ts"]'

This also allows glob patterns that contain commas, for example:

COCOINDEX_CODE_EXCLUDED_PATTERNS='["{**/*.md,**/*.txt}"]'

Note

I saw the suggestion to also respect .gitignore, which could be useful as well. For this PR I kept the scope to explicit custom exclude patterns, since there is (for me at least) also value in excluding files that are intentionally committed, such as certain auto generated files. If the .gitignore approach is preferred, feel free to close this PR. Happy to receive feedback :)

@georgeh0
Copy link
Member

Thanks for contributing!

(minor format issue, I'll merge first and auto reformat)

@georgeh0 georgeh0 merged commit 3c7ebb6 into cocoindex-io:main Mar 13, 2026
0 of 5 checks passed
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.

2 participants