Elegant, streaming chat UI for multiple AI providers. Built with FastAPI (backend), React + Tailwind (web), and Electron (desktop). Features beautiful animated backgrounds, syntax-highlighted code blocks, KaTeX math, and Mermaid diagrams.
- Letter‑by‑letter streaming via WebSocket with a smooth typewriter effect.
- Markdown rendering with KaTeX math and Mermaid diagram support.
- Code blocks with syntax highlighting (highlight.js), copy, and wrap toggle.
- Animated backgrounds with theme‑aware accent glow.
- Multi‑provider ready: OpenAI, OpenRouter, Anthropic, Gemini, Azure, Ollama, Together, Fireworks, Perplexity, Mistral, DeepSeek, Cohere, LiteLLM, vLLM.
Note: Fern requires you to bring your own API keys. A Welcome popup appears on first launch to guide you to Settings.
- Python 3.10+
- Node.js 18+
- Windows/macOS/Linux
- Create and activate a Python virtual environment
python -m venv .venv
. .venv\Scripts\Activate.ps1 # PowerShell on Windows
- Install backend deps
pip install -r requirements.txt
- Build web UI
cd web
npm install
npm run build # outputs to web/dist
- Run Electron (spawns FastAPI automatically)
cd ../electron
npm install
npm start
The app will open at http://127.0.0.1:8000 in an Electron window. On first launch, the Welcome modal will prompt you to open Settings and paste your API keys.
Set environment variables before launching (any that apply):
$Env:OPENAI_API_KEY = "sk-..."
$Env:ANTHROPIC_API_KEY = "sk-ant-..."
$Env:GOOGLE_API_KEY = "AIza..." # Gemini
$Env:OPENROUTER_API_KEY = "sk-or-..."
# ...and so on for the providers you use
You can also paste keys in the Settings dialog in the app.
Fern uses electron-builder
for packaging.
- Ensure the web UI is built:
cd web
npm run build
- Build installers with electron-builder:
cd ../electron
npm install
npm run dist
Artifacts are written to electron/dist/
(NSIS on Windows, DMG on macOS, AppImage on Linux). Icons are sourced from Assets/Logo
.
- Choose themes in Settings; animated background intensity adapts per theme.
- “Glass” UI lets the glow shine through; adjust in
web/src/index.css
if desired.
- Backend:
FastAPI
,Uvicorn
- Web:
React
,Tailwind
,marked
,highlight.js
,katex
,mermaid
- Desktop:
Electron
,electron-builder
PRs welcome! Please open issues for bugs/requests. Ensure web
builds and the Electron app starts before submitting changes.
MIT