Skip to content

File Filtering

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:

Terminal window
promptext -u=false # Only use explicit excludes

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.

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

Config file:

.promptext.yml
excludes:
- test/
- "*.generated.*"
- docs/private/

Command line:

Terminal window
promptext -x "test/,*.generated.*,docs/private/"

Automatically respects .gitignore patterns. Disable with:

Terminal window
promptext -g=false
  1. Default patterns (if enabled)
  2. GitIgnore patterns (if enabled)
  3. Custom excludes (config + command line)

All patterns are combined and deduplicated for optimal performance.