File Filtering
Smart Defaults
Section titled “Smart Defaults”promptext automatically excludes common non-source files:
- Dependencies:
node_modules/
,vendor/
,bower_components/
- Build Output:
dist/
,build/
,out/
,target/
- Version Control:
.git/
,.svn/
,.hg/
- IDE Files:
.idea/
,.vscode/
,*.sublime-*
- Cache:
__pycache__/
,.sass-cache/
,.npm/
- Logs:
logs/
,*.log
,tmp/
Disable default rules:
promptext -u=false # Only use explicit excludes
Binary Detection
Section titled “Binary Detection”Automatically skips binary files by detecting:
- Null bytes in first 512 bytes
- Invalid UTF-8 encoding
No need to specify binary extensions — images, executables, and archives are automatically excluded.
Custom Patterns
Section titled “Custom Patterns”Pattern Types
Section titled “Pattern Types”Directory matching:
excludes: - test/ # Any 'test' directory - internal/tmp/ # Specific path
Wildcards:
excludes: - "*.test.go" # Test files - ".aider*" # Generated files
Exact matches:
excludes: - config.json # Specific file - src/constants.go # Exact path
Configuration
Section titled “Configuration”Config file:
excludes: - test/ - "*.generated.*" - docs/private/
Command line:
promptext -x "test/,*.generated.*,docs/private/"
GitIgnore Integration
Section titled “GitIgnore Integration”Automatically respects .gitignore
patterns. Disable with:
promptext -g=false
Filter Priority
Section titled “Filter Priority”- Default patterns (if enabled)
- GitIgnore patterns (if enabled)
- Custom excludes (config + command line)
All patterns are combined and deduplicated for optimal performance.