Configuration File Location
OpenGround stores configuration at:- Linux/macOS
- Windows
XDG_CONFIG_HOME is set:The config file is automatically created with default values when you first run any
openground command.View Configuration
Display your current configuration:View Defaults Only
See hardcoded default values (ignoring your custom settings):Get Config File Path
Print the path to the config file:Default Configuration
OpenGround uses these defaults:Set Configuration Values
Modify configuration settings using theconfig set command:
Configuration Examples
Get Configuration Values
Retrieve a specific configuration value:Get Examples
Reset Configuration
Delete your config file and restore defaults:Configuration Settings Reference
Database Settings
string
default:"~/.local/share/openground/lancedb"
Path to LanceDB database directory. Stores embeddings and vector indexes.
string
default:"documents"
Name of the LanceDB table for storing document chunks.
string
default:"~/.local/share/openground/raw_data"
Directory for storing extracted JSON files before embedding.
Extraction Settings
integer
default:"50"
Maximum number of concurrent HTTP requests during sitemap extraction. Higher values extract faster but use more resources.
Embedding Settings
integer
default:"32"
Number of text chunks to embed in each batch. Larger batches are faster but use more memory.
integer
default:"800"
Maximum number of characters per chunk when splitting documents. Affects embedding granularity.
integer
default:"200"
Number of overlapping characters between consecutive chunks. Helps maintain context across chunk boundaries.
string
default:"BAAI/bge-small-en-v1.5"
Name of the embedding model from Hugging Face. Must match the embedding backend.
integer
default:"384"
Dimensionality of embedding vectors. Must match the model’s output dimensions.
string
default:"fastembed"
Backend for generating embeddings. Options:
"fastembed" or "sentence-transformers"Query Settings
integer
default:"5"
Default number of search results to return. Can be overridden with
--top-k flag.Source Settings
boolean
default:"true"
Automatically save library sources to
~/.openground/sources.json when adding libraries with --source flag.string
Custom path to sources.json file. If not set, uses standard search order (project → user → package).
Embedding Backend Options
OpenGround supports two embedding backends:FastEmbed (Default)
- ✅ Faster inference
- ✅ Lower memory usage
- ✅ Optimized for CPU
- ✅ No dependency on PyTorch
Sentence Transformers
- ✅ More model options
- ✅ Better GPU support
- ✅ Active development
- ✅ Widely used
How do I change embedding models?
How do I change embedding models?
- Set the new model:
- Delete existing embeddings:
- Re-embed your libraries:
embedding_dimensions matches your model’s output size.Chunking Configuration
Chunking parameters affect how documents are split before embedding:How do chunk_size and chunk_overlap affect search quality?
How do chunk_size and chunk_overlap affect search quality?
Larger chunks (800-1200 chars):
- Better context preservation
- Fewer total chunks (faster indexing)
- May include irrelevant content
- Good for conceptual queries
- More precise results
- Better for specific queries
- More chunks (slower indexing)
- May lose broader context
- Prevents information loss at boundaries
- Higher overlap = more context retention
- Higher overlap = more chunks
Source File Configuration
OpenGround searches for library source configurations in this order:- Custom path (if provided via
--sources-fileorsources.file_path) - Project-local:
./.openground/sources.json - User home:
~/.openground/sources.json - Package-level:
openground/extract/sources.json
Disable Auto-Add to Sources
By default, when you add a library with--source, it’s saved to ~/.openground/sources.json:
Custom Sources File
Environment Variables
OpenGround respects XDG Base Directory specification:Configuration in Python
Access configuration from Python code:Advanced Configuration Examples
High-Performance Setup
High-Quality Setup
Custom Storage Setup
Large-Scale Setup
Configuration Best Practices
1
Start with Defaults
Use default settings initially and only customize when needed:
2
Test Before Committing
Test configuration changes on a small library before re-embedding large libraries:
3
Document Custom Settings
Keep a record of why you changed settings:
4
Version Control
For team projects, commit
.openground/sources.json to version control:Should I commit config.json to version control?
Should I commit config.json to version control?
No -
config.json is user-specific and contains local paths. It should not be committed.Yes - .openground/sources.json is project-specific and can be shared with your team.What happens if I change chunk_size after embedding?
What happens if I change chunk_size after embedding?
Existing embeddings use the old chunk_size. They won’t automatically update. To apply new chunking:Or use
- Change the setting:
- Delete and re-add libraries:
nuke for all libraries:Can I use different configs for different projects?
Can I use different configs for different projects?
Yes! Use project-local sources:Each project can have different source configurations.
Troubleshooting
Config changes don't take effect
Config changes don't take effect
Clear the config cache:Or restart your Python process/terminal.
Invalid JSON error when loading config
Invalid JSON error when loading config
Your config file has syntax errors. View it:Fix JSON syntax or reset:
Permission denied writing config
Permission denied writing config
Check directory permissions:Fix permissions:
Next Steps
Querying
Use your configured settings to query documentation
Adding Libraries
Add libraries using custom configuration