Config
Complete reference for lightfast.yml configuration files
Config
The lightfast.yml file controls what gets indexed from your repository and how Lightfast organizes your engineering knowledge. This guide covers all configuration options and best practices.
Quick Start
Get started with the minimal configuration:
That's it! This config will index all Markdown files in your docs/ directory.
Next steps: Place this file in your repository root as lightfast.yml, then add more file patterns below.
Config File Location
Place your lightfast.yml file in the root directory of your repository. Lightfast automatically detects this file when your repository is connected and uses it to determine what to index.
Core Concepts
version (required)
The configuration version. Currently only version 1 is supported.
include (required)
Array of glob patterns matching files to index. Patterns are relative to your repository root and use standard glob syntax.
Glob Pattern Syntax:
*- Matches any characters except/**- Matches any characters including/(recursive)?- Matches any single character except/[abc]- Matches any character in the set
Best Practices:
- Use specific patterns to avoid indexing unnecessary files
- Start with documentation files (
.md,.mdx,.txt) - Consider including design documents and RFCs
- Test patterns locally before committing
Configuration Reference
Quick reference for all available options:
| Field | Required | Type | Constraints | Description |
|---|---|---|---|---|
version | ✅ | number | Must be 1 | Configuration schema version |
include | ✅ | string[] | Valid glob patterns (relative paths), minimum 1 pattern | Array of glob patterns matching files to index |
Automatic Exclusions: node_modules/, .git/, dist/, build/, .next/, .turbo/, dotfiles
Pattern Selection Guide
Choose the right patterns for your use case:
Documentation Sites
Use when: You have a dedicated docs folder with Markdown/MDX files
Engineering Wikis
Use when: You maintain design docs, RFCs, and runbooks
API Documentation
Use when: You have OpenAPI specs and API reference docs
Monorepo Documentation
Use when: Each package has its own documentation
Warning: Large codebases with many source files may hit indexing limits. Start with documentation files and expand as needed.
Validation and Errors
Lightfast validates your configuration when indexing starts. Common errors:
No Include Patterns
At least one include pattern is required
Fix: Add at least one glob pattern to the include array.
Invalid Glob Pattern
- •
Pattern '/absolute/path/*.md' should not start with / - •
Pattern 'C:\docs\*.md' appears to be an absolute path
Fix: Use relative paths from repository root (e.g., docs/*.md instead of /docs/*.md or C:\docs\*.md).
Testing Your Configuration
Before committing, test your glob patterns locally:
This shows which files will be matched by your patterns.
Updating Configuration
To update your configuration:
- Edit
lightfast.ymlin your repository - Commit and push changes
- Lightfast automatically detects updates and re-indexes
Changes take effect within minutes. Previous indexed content from removed patterns will be automatically cleaned up.
Complete Example
Full configuration with all available options:
What's Next?
- Quickstart - Index your first repository
- Core Concepts - Understand how Lightfast works
- Authentication - Use the API in your apps