Filtering by Project Type¶
Ready-made filter sets for common kinds of project. Pattern Filtering explains the rules behind them.
Note
--exclude-pattern and --include-pattern match a file's name, not its path. To filter by location, use --exclude (directory names) or --ignore-file (gitignore-style, path-aware).
Python¶
recursivist visualize \
--exclude __pycache__ --exclude .pytest_cache --exclude .venv --exclude venv \
--exclude-ext .pyc --exclude-ext .pyo \
--exclude-pattern "test_*.py" \
--ignore-file .gitignore
To show backend source without its tests using regular expressions instead:
JavaScript / TypeScript¶
recursivist visualize \
--exclude node_modules --exclude dist --exclude build --exclude coverage \
--exclude-ext .map --exclude-ext .log \
--exclude-pattern "*.test.js" --exclude-pattern "*.spec.ts" --exclude-pattern "*.min.js" \
--ignore-file .gitignore
One regular expression covers the JavaScript and TypeScript test files, including .jsx and .tsx:
Java / Maven¶
recursivist visualize \
--exclude target --exclude .idea \
--exclude-ext .class --exclude-ext .jar \
--exclude-pattern "*Test.java" \
--ignore-file .gitignore
Documentation Only¶
Without Generated and Minified Assets¶
recursivist visualize \
--exclude dist --exclude build \
--exclude-ext .map \
--exclude-pattern "*.min.js" --exclude-pattern "*.bundle.js"
What Matters Most¶
Pair filters with a metric sort to surface the files worth looking at:
# Largest source files
recursivist visualize --exclude node_modules --exclude .git --sort-by-size
# Most recently changed files
recursivist visualize --exclude node_modules --exclude .git --exclude dist --sort-by-mtime
A Reusable Ignore File¶
When the same exclusions apply on every run, keep them in a gitignore-style file of their own instead of on the command line:
# .recursivist-ignore
# Dependencies and build output
node_modules/
venv/
dist/
build/
# Logs and caches
*.log
.cache/
# Editor files
.vscode/
.idea/
*.swp
Sharing Filters with Your Team¶
Commit a .recursivist.toml to the repository (or add a [tool.recursivist] table to pyproject.toml) so that everyone gets the same view without passing any options:
See Configuration.