Skip to content

Configuration

Config File

igraph init generates .igraph/config.json in the current directory. The graph database is stored at .igraph/igraph.db.

The config file has five sections:

jsonc
{
  "embedding": { ... },    // Vectorization settings
  "llm": { ... },          // LLM summary settings
  "parser": { ... },       // Parser settings
  "retrieval": { ... },    // Retrieval settings
  "multimodal": { ... }    // Multimodal association settings
}

embedding — Vectorization

FieldTypeDefaultDescription
baseURLstringhttp://localhost:8080/v1Embedding API endpoint
modelstringbge-m3Embedding model name
dimensionsnumber1024Vector dimensions
batchSizenumber32Batch embedding size

llm — LLM Summaries

FieldTypeDefaultDescription
baseURLstringhttps://api.openai.com/v1LLM API endpoint
modelstringgpt-4o-miniSymbol summary model
fileSummaryModelstringgpt-4oFile summary model
temperaturenumber0Generation temperature
maxConcurrencynumber5Max concurrent requests
promptVersionstringv1.0Prompt version identifier

parser — Parser

FieldTypeDefaultDescription
languagesstring[]["typescript", "javascript"]Enabled languages
includestring[]["**/*"]File include globs
excludestring[]See belowFile exclude globs

Default exclude patterns:

json
["node_modules/**", "dist/**", "**/*.test.*", "**/*.spec.*", "**/*.d.ts"]

retrieval — Retrieval

FieldTypeDefaultDescription
fileTopKnumber10File-level retrieval count
nodeTopKnumber10Symbol-level retrieval count
fallbackThresholdnumber0.75Fallback threshold
graphHopsnumber2Graph expansion hops
fusionstringrrfFusion strategy
rrfKnumber60RRF fusion parameter
denseWeightnumber1.0Dense channel weight
ftsWeightnumber1.0FTS5 channel weight
resourceTopKnumber3Independent resource retrieval count (searches resource_vectors directly)

multimodal — Multimodal Association

FieldTypeDefaultDescription
strongLinkThresholdnumber0.85Strong association threshold
weakLinkThresholdnumber0.7Weak association threshold
llmConfirmWeakLinksbooleanfalseUse LLM to confirm weak associations

Credential Management

Security Constraint

API Keys and other sensitive data must never be written to project-level config files (to prevent committing to git). Config validation actively scans for and rejects configs containing credential fields.

Use igraph config set once, shared across all projects:

bash
igraph config set apiKey sk-xxx
igraph config set embedding.baseURL http://my-embedding:8080/v1
igraph config set llm.baseURL https://api.openai.com/v1

Global config is stored at ~/.igraph/config.json. View with igraph config list.

Environment Variables (Highest Priority)

VariableDescriptionRequired
IGRAPH_API_KEYShared key for LLM / EmbeddingRequired for online commands
IGRAPH_EMBEDDING_BASE_URLOverrides embedding.baseURLOptional
IGRAPH_LLM_BASE_URLOverrides llm.baseURLOptional

Priority

Environment variables > Global config (~/.igraph/config.json) > Project config (.igraph/config.json)

bash
# Environment variable (temporary override)
export IGRAPH_API_KEY="sk-..."

Without an API Key:

  • build / rebuild can run with --no-llm for heuristic fallback
  • query / eval / serve automatically fall back to FTS5-only retrieval

Released under the MIT License