A high-performance, local-first chat application built with Tauri v2, React, and Rust.
- Local-first desktop app with Tauri: fast startup, small footprint, no browser overhead.
- Multiple model families (OpenAI-compatible, Gemma, Granite, Phi, etc.) with model-specific tool-calling formats.
- Offline-friendly: state stored locally; LanceDB keeps chat history on disk.
- Built-in agentic loop: models can call Python code, search tools, or MCP tools with auto-approval for built-ins.
- Streaming by default: tokens arrive via Tauri events and append to the latest assistant message for smooth UI updates.
- Robust listener management: the store uses generation counters to avoid duplicated Tauri event handlers during hot reloads.
- Frontend: React 19 + Tailwind v4 (via
@tailwindcss/postcss) in a single-page app embedded by Tauri. - State: Zustand store (
src/store/chat-store.ts) manages chats, streaming message assembly, and listener lifecycle. - Backend: Rust (Tauri v2) handles model requests, streaming, and tool execution; profiles per model family live in
src-tauri/src/model_profiles.rs. - Tool calling: the agentic loop (
src-tauri/src/lib.rs) resolves tools (built-in Python sandbox and tool search, plus MCP servers), executes them, and streams formatted results back. - Python sandbox: RustPython-based sandbox with a curated allowlist; validation happens in
code_execution.rsbefore execution. - Vector store: LanceDB at
src-tauri/data/lancedb/chats.lance; schema defined insrc-tauri/src/actors/vector_actor.rs(drops/recreates on schema mismatch). - Desktop build artifacts: Tauri bundles platform installers; icon variants generated from a single source PNG.
Open Terminal and run:
./requirements.shThis script will:
- Install Xcode Command Line Tools (if needed)
- Install Homebrew (if needed)
- Install Node.js, Rust, Git, and Protocol Buffers
- Run
npm installautomatically - Tell you exactly what to do next
Once complete, start the app:
npx tauri devDouble-click requirements.bat or run in Command Prompt/PowerShell:
.\requirements.batThis script will:
- Validate prerequisites (Windows version, disk space, network connectivity)
- Install Visual Studio Build Tools with C++ workload, Microsoft Foundry Local, Node.js, Rust, Git, and Protocol Buffers via winget
- Verify each installation and provide clear error messages if something fails
- Initialize the Rust toolchain
- Run
npm installautomatically - Tell you exactly what to do next
Tip: Run
requirements.bat --checkto diagnose issues without installing anything.
Once complete, start the app:
npx tauri devnpx tauri devOr using Cargo from the workspace root:
cargo runBoth commands will build the frontend and compile the Rust backend.
npx tauri buildOr:
cargo build --releaseThe binary will be located at: target/release/plugable-chat
- The dev MCP test server stays disabled by default, but you can launch it from the workspace:
cargo mcp-testOr run it directly from the backend binary (no model/agentic loop):
cargo run -p plugable-chat -- --run-mcp-test-server- If port
43030is in use, override it:
cargo run -p plugable-chat -- --run-mcp-test-server --mcp-test-port 3333- On startup it will:
- Serve a small status UI at
http://127.0.0.1:43030by default (opens your browser automatically; disable with--open-ui falseor--serve-ui false; override with--mcp-test-port <PORT>). - Print a ready-made prompt you can paste into chat to trigger the full red/green sweep.
- Expose MCP tools including
run_all_tests,get_test_status, and the existing echo/math/json/error helpers.
- Serve a small status UI at
- Endpoints:
GET /— UI with live red/green board and logsPOST /api/run-all— trigger full test sweep (same as the MCP tool)GET /api/status— JSON with counts, per-test results, and the recommended promptGET /api/logs— recent log lines for agentic debugging
To auto-connect the desktop app to the dev test server, launch it with:
PLUGABLE_ENABLE_MCP_TEST=1 npx tauri devHelper scripts (start server + app together):
- macOS/Linux:
./scripts/mcp-test.sh - Windows:
powershell -ExecutionPolicy Bypass -File scripts/mcp-test.ps1
For creating distributable installers (DMG, MSI, etc.), use the automation scripts in scripts/:
./scripts/bundle-macos.sh.\scripts\bundle-windows.ps1The repo tracks only the highest-resolution PNG (src-tauri/icons/icon.png). All other sizes and formats are generated automatically:
npm run generate-iconsThis runs automatically during builds, so you only need to run it manually if you replace the source icon.
| Directory | Description |
|---|---|
/ |
Cargo Workspace root |
src-tauri/ |
Rust backend and Tauri configuration |
src/ |
React frontend (TypeScript) |
scripts/ |
Platform-specific build automation |
Before troubleshooting manually, run the diagnostic check to identify issues:
# Windows
.\requirements.bat --check
# macOS/Linux
./requirements.sh --checkThis reports system info, installed components, and network connectivity without making changes.
Symptoms: Script exits immediately with "winget is required but not installed"
Solution:
- Open Microsoft Store
- Search for "App Installer"
- Install or update "App Installer" by Microsoft Corporation
- Close and reopen your terminal
- Re-run
requirements.bat
Symptoms: Script appears frozen during package checks or initialization
Solutions:
- Check for UAC dialogs - Look behind the terminal window or in your taskbar for a "User Account Control" prompt
- Install Foundry Local first - Some users report this prevents hanging:
winget install Microsoft.FoundryLocal
- Reset winget sources (run PowerShell as Administrator):
winget source reset --force - Restart your computer and try again
Symptoms: Rust compilation fails with linker errors
Solution:
- Open "Visual Studio Installer" from the Start Menu
- Click "Modify" next to "Build Tools 2022"
- Check the box for "Desktop development with C++"
- Ensure "MSVC v143 - VS 2022 C++ x64/x86 build tools" is selected
- Click "Modify" and wait for installation
- Open a new terminal and re-run the build
Symptoms: Script fails because Visual Studio Installer is already running
Solution:
- Close all Visual Studio Installer windows
- Check the system tray for any VS Installer processes
- Wait for any pending updates to complete
- Re-run
requirements.bat
Symptoms: "running scripts is disabled on this system"
Solution: Always use requirements.bat (not the .ps1 file directly). The batch wrapper handles execution policy automatically. If issues persist:
# Run in PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserSymptoms: Warning about "rust-std-wasm32-wasi" not available
Impact: WASM sandboxing disabled, but the app still works (Python sandbox uses RustPython directly)
Solution: This is usually a temporary network issue. You can manually install later:
rustup target add wasm32-wasip1If git pull reports conflicts or shows Cargo.toml as modified when you haven't changed it, this is usually caused by line ending differences between platforms. To fix:
# Reset line endings for the affected file
git checkout -- src-tauri/Cargo.toml
# Then pull normally
git pullFor a complete line ending refresh (one-time fix for existing clones):
# Re-normalize all files according to .gitattributes
git rm --cached -r .
git reset --hardIf you prefer to install dependencies manually instead of using the requirements scripts:
| Dependency | macOS | Windows |
|---|---|---|
| Node.js (v18+) | brew install node |
winget install OpenJS.NodeJS.LTS |
| Rust (Stable) | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh |
winget install Rustlang.Rustup |
| Protocol Buffers | brew install protobuf |
winget install Google.Protobuf |
| Build Tools | Xcode CLT: xcode-select --install |
VS Build Tools + C++ workload |
After installing, run:
npm install
npx tauri dev