Filtering files

Filtering files

codemap decides which files to include in this order:

  1. Discover files under the root directory.
  2. Apply include patterns (--include, -i).
  3. Apply exclude patterns (--exclude, -e).
  4. Skip files larger than the size limit (--max-file-size, -m).

Include and exclude

Patterns use glob syntax and are matched against paths relative to the root. Separate multiple patterns with commas.

codemap --include "src/**/*.cs,tests/**/*.cs"
codemap --exclude "**/bin/**,**/obj/**"

Size limit

codemap --max-file-size 1048576

Empty directories

Empty directories are listed in the output when they pass the include and exclude rules. An empty directory that matches no include pattern is omitted.

Built-in exclusions

These directory names are always skipped at any depth: .git, bin, obj, node_modules, dist, and coverage.