
folderchat is a Windows desktop application that provides an AI chat interface enhanced with Retrieval-Augmented Generation (RAG) capabilities. It allows you to have conversations with AI models while providing relevant context from your local documents and folders.
git clone https://github.com/straygizmo/folderchat.git
cd folderchat
dotnet build .\folderchat.sln
folderchat\bin\Debug\net9.0-windows\This project uses Blazor WebView inside a Windows Forms app. To create a distributable build that runs on another machine, publish the app so that all required assets (including wwwroot and python_tools) are copied into a single folder.
Steps:
dotnet clean
dotnet publish -c Release -r win-x64 --self-contained false
folderchat/bin/Release/net9.0-windows/win-x64/publish/publish directory to the target PC (e.g., D:\apps\folderchat\).--self-contained false)folderchat.exe from the publish folderwwwroot relative to the executabledotnet publish -c Release -r win-x64 --self-contained true
Notes:
wwwroot folder is copied into the output so Blazor WebView resolves assets relative to the app directory.python_tools folder is copied automatically into both build and publish outputs. Do NOT publish a local .venv under python_tools (it is excluded). On the target PC, set up Python dependencies by ONE of the following:
py -m venv python_tools\.venv
python_tools\.venv\Scripts\pip install -r python_tools\requirements.txt
cd python_tools
uv sync
python_tools\python.exe (e.g., WinPython) and then run:
python_tools\python.exe -m pip install -r python_tools\requirements.txt
noavx variant to avoid duplicate publish conflicts. This improves portability across CPUs; for AVX-specific builds, adjust the project configuration as needed.Python tools are required for document processing, chunking, and embedding functionality. folderchat uses Python for:
Choose ONE of the following ways to prepare Python on the target PC. Do not redistribute a local .venv created on your dev PC.
A) pip (recommended when uv is not available)
python_tools:
py -m venv python_tools\.venv
python_tools\.venv\Scripts\pip install -r python_tools\requirements.txt
B) uv (optional)
python_tools directory:
cd python_tools
uv sync
Note: The .venv created by uv is NOT portable. Do not copy it to other PCs; always create it on the target PC.
C) Portable Python (optional, no system install)
python_tools\python.exe (e.g., WinPython).python_tools\python.exe -m pip install -r python_tools\requirements.txt
This installs all required Python dependencies including:
Note: Without proper Python tools setup, RAG functionality will not work correctly.
folderchat supports multiple API providers:
http://localhost:1234 for LM Studio)gemma3)You can use local GGUF chat models without an external API. Place your GGUF model files in:
python_tools/models/chat/[provider_name]/[modelfile_name].gguf
For example, download a model from unsloth/gemma-3n-E4B-it-GGUF and place it as:
python_tools/models/chat/unsloth/gemma-3n-E4B-it-Q4_K_M.gguf
This allows you to run chat models entirely offline using LLamaSharp.
For RAG functionality, configure embedding settings:
http://localhost:1234 for LM Studio)text-embedding-embeddinggemma-300m)You can use local GGUF embedding models without an external API. Download GGUF embedding models from Hugging Face and place them in:
python_tools/models/embedding/[provider_name]/[modelfile_name].gguf
For example, download a model from unsloth/embeddinggemma-300m-GGUF and place it as:
python_tools/models/embedding/unsloth/embeddinggemma-300M-Q8_0.gguf
This allows you to run embeddings locally without requiring an external API service.
folderchat supports MCP servers that enable LLMs to interact with external tools and resources. MCP servers can provide file system access, API integrations, database connections, and more.
python, node, npx)A common use case is setting up a file system MCP server to allow the LLM to read and write files:
Name: Filesystem
Transport Type: stdio
Command: npx
Arguments: -y @modelcontextprotocol/server-filesystem C:\path\to\allowed\directory
This gives the LLM access to list, read, and write files within the specified directory.
Many MCP servers are available, including:
When MCP is enabled:
Note: MCP tool execution is automatically logged in the application’s log view, showing both tool calls and their responses.
Launch the Application: Run folderchat.exe
Select Folders: Use the folder tree on the left to select directories containing documents you want to include in your knowledge base
.md files are saved in the same directory as the source filesembeddings.jsonl file is created in each checked folder containing the indexed document chunksStart Chatting: Type your questions in the chat interface. The AI will use both its training and the context from your documents to provide answers
folderchat/
├── folderchat/ # Main application project
│ ├── Forms/ # Windows Forms UI components
│ ├── Pages/ # Blazor components
│ ├── Services/ # Business logic and services
│ │ ├── Chat/ # Chat service implementations
│ │ ├── Mcp/ # Model Context Protocol client (official SDK)
│ │ ├── IChatService.cs # Chat service interface
│ │ ├── IRagService.cs # RAG service interface
│ │ ├── OpenAIChatService.cs
│ │ ├── ClaudeCodeChatService.cs
│ │ └── RagService.cs # RAG implementation
│ ├── Models/ # Data models
│ └── wwwroot/ # Web assets for Blazor
├── python_tools/ # Python utilities
│ ├── main.py # Main entry point for Python tools
│ ├── converter.py # Document conversion (MarkItDown integration)
│ ├── document_parser.py # Document parsing utilities
│ ├── embeddings.py # Embedding generation
│ ├── indexer.py # Document indexing
│ ├── retriever.py # Document retrieval
│ ├── gguf_loader/ # GGUF model loading utilities
│ └── models/ # Local model storage
│ ├── chat/ # Chat model directory
│ │ └── [provider_name]/ # Provider-specific chat models
│ │ └── [model_name].gguf
│ └── embedding/ # Embedding model directory
│ └── [provider_name]/ # Provider-specific embedding models
│ └── [model_name].gguf
└── folderchat.sln # Visual Studio solution file
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
This occurs when a non-portable .venv (created on the developer PC) was copied to the target PC and still points to a base interpreter under the developer’s AppData\Roaming\uv\python\.... Fix:
python_tools\.venv from the publish folder if it exists (we exclude it in publish by default).Text Files:
Code Files:
Configuration Files:
Script Files:
Web Files:
Office Documents (requires python_tools):
MIT