Stay updated — Join the build list for tutorials and AI insights. No spam.

Ignoring Files

Configure .graphifyignore to exclude files and directories from the knowledge graph.

Ignoring Files

Configure .graphifyignore to exclude files and directories from the knowledge graph, reducing noise and build time.

📝 What is .graphifyignore?

A .graphifyignore file in your project root tells Graphify which files/directories to skip during extraction. Syntax matches .gitignore.

🎯 Why Ignore Files?

ReasonExample
Reduce noiseExclude generated files, vendor code
Faster buildsSkip large directories (node_modules, dist)
PrivacyExclude secrets, configs, local files
RelevanceFocus on your code, not dependencies

📝 Syntax

Same as .gitignore:

 1# Comments start with #
 2# Negate with !
 3
 4# Directory (matches anywhere)
 5node_modules/
 6dist/
 7build/
 8
 9# Directory at root only
10/vendor/
11/dist/
12
13# File pattern
14*.min.js
15*.map
16*.log
17
18# Specific file
19.env
20config.local.yaml
21
22# Negate (don't ignore)
23!important.config.js

📋 Common Patterns for This Project

 1# .graphifyignore for hbstack/ghafoors-blog
 2
 3# Dependencies
 4node_modules/
 5vendor/
 6_pkg/
 7
 8# Build outputs
 9dist/
10build/
11public/
12temp-builds/
13*.min.js
14*.map
15
16# Hugo
17.hugo_build.lock
18hugo_stats.json
19resources/_gen/
20
21# JupyterLite
22.jupyterlite.doit.db*
23jupyter_lite_build/
24/static/jupyterlite/
25.ipynb_checkpoints/
26
27# Python
28__pycache__/
29*.py[cod]
30*$py.class
31*.so
32.env
33.env.*
34.venv/
35venv/
36ENV/
37
38# IDE
39.idea/
40.vscode/
41*.swp
42*.swo
43*~
44
45# OS
46.DS_Store
47Thumbs.db
48
49# Project specific
50.attic/
51util/temp-work/
52util/reference-samples/
53.pdf-output/
54mcq/
55ags-mcq-module/
56
57# Secrets
58.env
59.env.local
60.env.*.local
61*.pem
62*.key
63
64# Logs
65*.log
66npm-debug.log*
67yarn-debug.log*
68
69# Test artifacts
70playwright-report/
71test-results/
72*.trace
73coverage/
74htmlcov/
75
76# Large data files
77*.csv
78*.parquet
79*.arrow

🔧 Configuration

Project Root (Auto-Detected)

Place .graphifyignore in project root — Graphify auto-detects it.

1# Create from .gitignore (good starting point)
2cp .gitignore .graphifyignore
3
4# Then edit to add/remove patterns
5# Graphify-specific additions:
6echo "*.ipynb.meta" >> .graphifyignore
7echo "/static/jupyterlite/" >> .graphifyignore

Global Ignore (Optional)

1# ~/.config/graphify/ignore (applies to all projects)
2echo "node_modules/" >> ~/.config/graphify/ignore
3echo "*.log" >> ~/.config/graphify/ignore

🚫 What Graphify Already Ignores

Graphify has built-in ignores you don’t need to duplicate:

  • .git/ and VCS directories
  • Binary files (images, videos, compiled)
  • Files >10 MB (configurable)
  • Hidden files starting with . (except .graphifyignore, .env)
  • Files without supported extensions

✅ Verification

1# Check what's being ignored
2graphify . --code-only 2>&1 | grep -i "ignored"
3
4# Output example:
5# [graphify extract] 627 path(s) ignored by ignore rules
6# ...

Debug Specific File

1# Check if a file is ignored
2graphify . --code-only --no-gitignore 2>&1 | grep "path/to/file"
3
4# If it appears, it's NOT ignored by .graphifyignore
5# If it doesn't appear, check .graphifyignore patterns

🎯 This Project’s .graphifyignore

 1# Generated from .gitignore + Graphify-specific
 2# See .gitignore for full list
 3
 4# Graphify-specific additions
 5*.ipynb.meta
 6/static/jupyterlite/
 7.jupyterlite.doit.db*
 8jupyter_lite_build/
 9.ipynb_checkpoints/
10
11# Attic (old versions)
12.attic/
13
14# Util temp
15util/temp-work/
16util/reference-samples/
17
18# PDF outputs
19pdf-output/

🔍 Debugging Ignore Issues

IssueDebug Command
File not indexed`graphify . –no-gitignore 2>&1grep “filename”`
Too many ignored`graphify . –code-only 2>&1grep “ignored”`
Pattern not workingCheck syntax: no leading / for anywhere-match
Want to include ignoredAdd !pattern to negate

Next Steps