This guide helps you migrate from the old configuration system to the new centralized configuration system introduced in v2.2.0.
Old behavior:
- Automatically loaded
.chunkhound.jsonfrom project root - Automatically loaded
~/.chunkhound/config.jsonfrom home directory
New behavior:
- Config files are only loaded when explicitly specified with
--configflag - Example:
chunkhound index . --config .chunkhound.json
The new system has a clear hierarchy (highest to lowest priority):
- CLI arguments
- Config file (via
--configpath) - Environment variables
- Default values
New variables:
All new environment variables use the CHUNKHOUND_ prefix with __ delimiter for nested values:
CHUNKHOUND_DEBUG- Enable debug modeCHUNKHOUND_DB_PATH- Database file pathCHUNKHOUND_DATABASE__PROVIDER- Database provider (sqlite/lancedb)CHUNKHOUND_DATABASE__LANCEDB_INDEX_TYPE- LanceDB index typeCHUNKHOUND_EMBEDDING__PROVIDER- Embedding providerCHUNKHOUND_EMBEDDING__MODEL- Embedding model nameCHUNKHOUND_EMBEDDING__API_KEY- API key for embeddingsCHUNKHOUND_EMBEDDING__BASE_URL- Base URL for APICHUNKHOUND_EMBEDDING__BATCH_SIZE- Batch size for embeddingsCHUNKHOUND_EMBEDDING__MAX_CONCURRENT- Max concurrent embedding batchesCHUNKHOUND_INDEXING__BATCH_SIZE- Indexing batch sizeCHUNKHOUND_INDEXING__DB_BATCH_SIZE- Database batch sizeCHUNKHOUND_INDEXING__MAX_CONCURRENT- Max concurrent operationsCHUNKHOUND_INDEXING__FORCE_REINDEX- Force reindexingCHUNKHOUND_INDEXING__CLEANUP- Enable cleanupCHUNKHOUND_INDEXING__IGNORE_GITIGNORE- Ignore gitignore filesCHUNKHOUND_INDEXING__INCLUDE- Include patterns (comma-separated)CHUNKHOUND_INDEXING__EXCLUDE- Exclude patterns (comma-separated)
All configuration options are now available as CLI arguments:
# Database configuration
chunkhound index . --database-path /path/to/db --database-provider lancedb
# Embedding configuration
chunkhound index . --embedding-provider openai --embedding-model text-embedding-3-small
# MCP configuration (stdio only)
chunkhound mcp
# Indexing configuration
chunkhound index . --indexing-batch-size 1000The configuration file format remains the same JSON structure:
{
"database": {
"provider": "lancedb",
"path": ".chunkhound/db"
},
"embedding": {
"provider": "openai",
"model": "text-embedding-3-small",
"batch_size": 1000,
"max_concurrent": 8
},
"mcp": {
"transport": "stdio"
},
"indexing": {
"batch_size": 100,
"db_batch_size": 5000,
"include": ["**/*.py", "**/*.js"],
"exclude": ["**/node_modules/**", "**/venv/**"]
},
"debug": false
}If you were relying on automatic config file loading:
Old:
chunkhound index .New:
chunkhound index . --config .chunkhound.jsonIf using environment variables, update to the new naming:
Old:
export OPENAI_API_KEY=sk-...
export CHUNKHOUND_DB_PATH=/path/to/dbNew:
export CHUNKHOUND_EMBEDDING__API_KEY=sk-...
export CHUNKHOUND_DATABASE__PATH=/path/to/dbRemember that CLI arguments now override config file values, which override environment variables:
# This will use text-embedding-3-large even if config file specifies different model
chunkhound index . --config .chunkhound.json --embedding-model text-embedding-3-largeUpdate any scripts or CI/CD pipelines to:
- Explicitly specify
--configif using config files - Use new environment variable names
- Take advantage of new CLI arguments for dynamic configuration
If you see an error about config file not found:
- Ensure you're using
--configwith the correct path - The config file is no longer auto-detected
- Check you're using the correct
CHUNKHOUND_prefix - Use
__(double underscore) for nested values - Ensure no typos in variable names
Use --debug flag to see which configuration source is being used:
chunkhound index . --config .chunkhound.json --debug- Explicit Control: No surprise config files being loaded
- Clear Precedence: Always know which setting wins
- Full CLI Support: Configure everything from command line
- Better Debugging: Clear configuration hierarchy
- Consistent Naming: All ChunkHound vars use same prefix