Skip to content

Add support for multiple document paths with glob patterns#1

Merged
badri merged 1 commit intomainfrom
claude/add-multiple-docs-011CUpsanwN1BK5KtdbNwCE1
Nov 5, 2025
Merged

Add support for multiple document paths with glob patterns#1
badri merged 1 commit intomainfrom
claude/add-multiple-docs-011CUpsanwN1BK5KtdbNwCE1

Conversation

@badri
Copy link
Copy Markdown
Owner

@badri badri commented Nov 5, 2025

This enhancement allows users to specify multiple document directories and glob patterns in config.json, providing more flexibility in organizing and indexing markdown files.

Features:

  • Config: Changed from single 'documents_dir' to 'document_patterns' array
  • Supports both directory paths and glob patterns (e.g., "./docs/**/*.md")
  • Backwards compatible: old 'documents_dir' automatically migrated
  • Sync: Uses pattern matching to find files instead of single directory walk
  • MCP tools: Updated path validation to work with multiple base directories
  • Tests: Added comprehensive tests for pattern expansion and migration
  • Documentation: Updated README with examples and pattern syntax

Example config.json:
{
"document_patterns": [ "./documents", "./notes//*.md", "./projects/backend//*.md" ], ... }

Pattern examples:

  • "./documents" - All .md files in directory
  • "./docs/**/*.md" - Recursive search with **
  • "./projects//docs/.md" - Wildcard patterns
  • "/path/to/external/docs" - Absolute paths

This enhancement allows users to specify multiple document directories
and glob patterns in config.json, providing more flexibility in
organizing and indexing markdown files.

Features:
- Config: Changed from single 'documents_dir' to 'document_patterns' array
- Supports both directory paths and glob patterns (e.g., "./docs/**/*.md")
- Backwards compatible: old 'documents_dir' automatically migrated
- Sync: Uses pattern matching to find files instead of single directory walk
- MCP tools: Updated path validation to work with multiple base directories
- Tests: Added comprehensive tests for pattern expansion and migration
- Documentation: Updated README with examples and pattern syntax

Example config.json:
{
  "document_patterns": [
    "./documents",
    "./notes/**/*.md",
    "./projects/backend/**/*.md"
  ],
  ...
}

Pattern examples:
- "./documents" - All .md files in directory
- "./docs/**/*.md" - Recursive search with **
- "./projects/*/docs/*.md" - Wildcard patterns
- "/path/to/external/docs" - Absolute paths
@badri badri merged commit 2ceedbe into main Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants