Graphify configuration file options and environment variables.
Graphify configuration file options, environment variables, and runtime settings.
| Location | Scope | Priority |
|---|---|---|
~/.config/graphify/config.yaml | Global (all projects) | Low |
.graphify.yaml | Project root | Medium |
--config PATH | CLI argument | High |
1# ~/.config/graphify/config.yaml
2
3# Model settings
4model:
5 path: ~/.cache/graphify/model.gguf # Local LLM model path
6 n_ctx: 8192 # Context window
7 n_gpu_layers: -1 # -1 = all on GPU; 0 = CPU only
8 n_threads: 8 # CPU threads for inference
9 verbose: false # Model debug output
10
11# Extraction settings
12extraction:
13 max_file_size_mb: 10 # Skip files larger than this
14 skip_binary: true # Auto-skip binary files
15 include_patterns: [] # Additional include globs
16 exclude_patterns: [] # Additional exclude globs
17 parallel_workers: 16 # AST extraction workers
18
19# LLM settings (for full graph)
20llm:
21 provider: gemini # gemini, openai, anthropic, moonshot, deepseek
22 api_key_env: GEMINI_API_KEY # Env var name for API key
23 model: gemini-1.5-flash # Model name
24 temperature: 0.1 # Generation temperature
25 max_tokens: 4096 # Max output tokens
26 timeout: 60 # Request timeout (seconds)
27
28# Activity tracking
29activity:
30 enabled: true # Enable activity signaling
31 path: ~/.graphify-stats # Activity data directory
32 auto_signal: true # Auto-touch .graphify-activity
33
34# Output settings
35output:
36 graph_path: graphify-out/graph.json # Graph file location
37 report_path: graphify-out/GRAPH_REPORT.md
38 html_path: graphify-out/graph.html
39 cluster_resolution: 1.0 # Community detection resolution
40 min_community_size: 3 # Min nodes per community
41
42# Logging
43logging:
44 level: INFO # DEBUG, INFO, WARN, ERROR
45 file: '' # Empty = stderr only
46 format: text # text, json
| Variable | Description | Default |
|---|---|---|
GEMINI_API_KEY | Google Gemini API key | — |
GOOGLE_API_KEY | Alias for Gemini | — |
OPENAI_API_KEY | OpenAI API key | — |
ANTHROPIC_API_KEY | Anthropic API key | — |
MOONSHOT_API_KEY | Moonshot/Kimi API key | — |
DEEPSEEK_API_KEY | DeepSeek API key | — |
GRAPHIFY_CONFIG | Custom config file path | ~/.config/graphify/config.yaml |
GRAPHIFY_CACHE_DIR | Model/cache directory | ~/.cache/graphify |
GRAPHIFY_GRAPH_PATH | Graph output path | graphify-out/graph.json |
GRAPHIFY_VERBOSE | Enable verbose logging | false |
GRAPHIFY_CODE_ONLY | Force code-only mode | false |
All config options can be overridden via CLI flags:
1# Model overrides
2graphify . --model-path /custom/model.gguf
3graphify . --n-ctx 16384
4graphify . --n-gpu-layers 0
5
6# Extraction overrides
7graphify . --max-file-size 5
8graphify . --exclude "*.test.py"
9graphify . --workers 8
10
11# LLM overrides
12graphify . --backend gemini --model gemini-1.5-pro
13graphify . --backend openai --model gpt-4o
14
15# Output overrides
16graphify . --graph-path custom-graph.json
17graphify . --report-path custom-report.md
18
19# Activity
20graphify . --no-activity-signal
Create .graphify.yaml in project root:
1# .graphify.yaml (project root)
2
3# Override global settings for this project
4model:
5 n_ctx: 16384 # Larger context for this codebase
6
7extraction:
8 exclude_patterns:
9 - '*.generated.py'
10 - 'migrations/'
11 - 'vendor/'
12
13llm:
14 provider: gemini
15 model: gemini-1.5-flash
16
17activity:
18 auto_signal: true
1model:
2 n_ctx: 16384 # For large files / complex queries
1model:
2 n_gpu_layers: 0 # Force CPU (no GPU / VRAM issues)
1extraction:
2 parallel_workers: 32
3 max_file_size_mb: 5
1output:
2 cluster_resolution: 1.5
3 min_community_size: 5
1activity:
2 enabled: false
1# Show effective config (merged from all sources)
2graphify config show
3
4# Show specific section
5graphify config show model
6graphify config show llm
~/.config/graphify/config.yaml).graphify.yaml) 1# .graphify.yaml for hbstack/ghafoors-blog
2
3model:
4 path: ~/.cache/graphify/model.gguf
5 n_ctx: 16384
6 n_gpu_layers: -1
7 n_threads: 8
8
9extraction:
10 max_file_size_mb: 10
11 skip_binary: true
12 exclude_patterns:
13 - 'node_modules/'
14 - 'dist/'
15 - 'build/'
16 - '.attic/'
17 - 'util/temp-work/'
18 - '*.min.js'
19 - '*.map'
20 parallel_workers: 16
21
22llm:
23 provider: gemini
24 api_key_env: GEMINI_API_KEY
25 model: gemini-1.5-flash
26 temperature: 0.1
27 max_tokens: 4096
28
29activity:
30 enabled: true
31 auto_signal: true
32
33output:
34 graph_path: graphify-out/graph.json
35 cluster_resolution: 1.0
36 min_community_size: 3
37
38logging:
39 level: INFO
40 format: text