Add support for reading include patterns from a file to improve usability when dealing with many specific files or complex patterns.
Problem
Currently, when using the --include option with many specific file paths, the command line becomes unwieldy and difficult to manage. For example:
repomix --include "file1.ts,file2.ts,file3.ts,file4.ts,file5.ts,..." # Very long command line
This becomes problematic when:
- Including many specific files (10+ files)
- Files have long paths
- You want to reuse the same set of files across multiple runs
- Working with version control where command history becomes messy
- Command line length limits are reached
Proposed Solution
Add a new option --include-from-file (or --include-file) that reads include patterns from a file, one per line.
Usage Example
# Create a file with patterns/files to include
echo "src/components/**/*.tsx
src/hooks/*.ts
src/lib/utils/dateUtils.ts
src/pages/dashboard/**/store.ts" > include-patterns.txt
# Use the file with repomix
repomix --include-from-file include-patterns.txt
File Format
- One pattern per line
- Empty lines and lines starting with
# are ignored (comments)
- Both glob patterns and specific file paths are supported
Example include file:
# UI Components
src/components/molecules/**/*.tsx
src/components/ui/*.tsx
# Utility functions
src/lib/utils/common.ts
src/lib/utils/dateUtils.ts
# Dashboard hooks
src/lib/hooks/dashboard/*.ts
Benefits
- Cleaner command line: Avoid extremely long command lines
- Reusability: Save and reuse file lists across different runs
- Version control friendly: Include patterns can be committed to the repository
- Better organization: Group related files with comments
- Easier maintenance: Modify file lists without retyping entire commands
Would love to see this feature added to make repomix even more flexible for complex project structures!
Add support for reading include patterns from a file to improve usability when dealing with many specific files or complex patterns.
Problem
Currently, when using the
--includeoption with many specific file paths, the command line becomes unwieldy and difficult to manage. For example:This becomes problematic when:
Proposed Solution
Add a new option
--include-from-file(or--include-file) that reads include patterns from a file, one per line.Usage Example
File Format
#are ignored (comments)Example include file:
Benefits
Would love to see this feature added to make repomix even more flexible for complex project structures!