Offline Development Assistant powered by Ollama and ChromaDB
Project description
GangDan - Offline Dev Assistant
A local-first, offline programming assistant powered by Ollama and ChromaDB. Chat with LLMs, build a vector knowledge base from documentation, run terminal commands, and get AI-generated shell suggestions -- all from a single browser tab.
GangDan (纲担) -- Principled and Accountable.
Features
- RAG Chat -- Ask questions with optional retrieval from a local ChromaDB knowledge base and/or web search (DuckDuckGo, SearXNG, Brave). Responses stream in real-time via SSE.
- AI Command Assistant -- Describe what you want to do in natural language; the assistant generates a shell command you can drag-and-drop into the terminal, execute, and auto-summarize.
- Built-in Terminal -- Run commands directly in the browser with stdout/stderr display.
- Documentation Manager -- One-click download and indexing of 25+ popular library docs (Python, Rust, Go, JS, C/C++, CUDA, Docker, etc.). Batch operations and GitHub repo search included.
- 10-Language UI -- Switch between Chinese, English, Japanese, French, Russian, German, Italian, Spanish, Portuguese, and Korean without page reload.
- Proxy Support -- None / system / manual proxy modes for both the chat backend and documentation downloads.
- Offline by Design -- Runs entirely on your machine. No cloud APIs required.
Screenshots
| Chat | Terminal |
|---|---|
| Documentation | Settings |
|---|---|
Requirements
- Python 3.10+
- Ollama running locally (default
http://localhost:11434) - A chat model pulled in Ollama (e.g.
ollama pull qwen2.5) - An embedding model for RAG (e.g.
ollama pull nomic-embed-text)
Quick Start
# 1. Clone or copy this folder
cd gangdan
# 2. Install Python dependencies
pip install -r requirements.txt
# 3. Make sure Ollama is running
ollama serve
# 4. Launch GangDan
python app.py
Open http://127.0.0.1:5000 in your browser.
Project Structure
gangdan/
├── app.py # Flask backend (routes, Ollama client, ChromaDB, i18n)
├── requirements.txt # Python dependencies
├── templates/
│ └── index.html # Jinja2 HTML template
├── static/
│ ├── css/
│ │ └── style.css # Application styles (dark theme)
│ └── js/
│ ├── i18n.js # Internationalization & state management
│ ├── utils.js # Panel switching & toast notifications
│ ├── markdown.js # Markdown / LaTeX (KaTeX) rendering
│ ├── chat.js # Chat panel & SSE streaming
│ ├── terminal.js # Terminal & AI command assistant
│ ├── docs.js # Documentation download & indexing
│ └── settings.js # Settings panel & initialization
├── images/ # Screenshots
└── data/ # Created at runtime
├── gangdan_config.json # Persisted settings
├── docs/ # Downloaded documentation
└── chroma/ # ChromaDB vector store
Architecture
The frontend and backend are fully decoupled:
- Backend (
app.py) -- A single Python file containing Flask routes, the Ollama client, ChromaDB manager, documentation downloader, web searcher, and conversation manager. All server-side configuration is injected into the template via awindow.SERVER_CONFIGblock. - Frontend (
templates/+static/) -- Pure HTML/CSS/JS with no build step. JavaScript files are loaded in dependency order and share state through global functions. KaTeX is loaded from CDN for LaTeX rendering.
ChromaDB is initialized with automatic corruption recovery: if the database is damaged, it is backed up and recreated transparently.
Configuration
All settings are managed through the Settings tab in the UI:
| Setting | Description |
|---|---|
| Ollama URL | Ollama server address (default http://localhost:11434) |
| Chat Model | Model for conversation (e.g. qwen2.5:7b-instruct) |
| Embedding Model | Model for RAG embeddings (e.g. nomic-embed-text) |
| Reranker Model | Optional reranker for better search results |
| Proxy Mode | none / system / manual for network requests |
Settings are persisted to data/gangdan_config.json.
License
This project is for personal and educational use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gangdan-1.0.0.tar.gz.
File metadata
- Download URL: gangdan-1.0.0.tar.gz
- Upload date:
- Size: 64.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afd982f59445f80c5167366e92226681df0dd7cb940d7c97c7425a3bb72218d9
|
|
| MD5 |
92041c10f47358ebe36322b8f49946a1
|
|
| BLAKE2b-256 |
514a7c8ca3a33d9328de205a82e4dd7a03112ff66e05ce9fd4c9b894644bc12d
|
File details
Details for the file gangdan-1.0.0-py3-none-any.whl.
File metadata
- Download URL: gangdan-1.0.0-py3-none-any.whl
- Upload date:
- Size: 64.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
456ec5fe0d769522e760b110e221ac9d2abcf2854d6331d74aa1b5b677d698b0
|
|
| MD5 |
c3b7e3cf41d7d2408796ab7acc1f4201
|
|
| BLAKE2b-256 |
6862bedfec4466b645f8c2c9583d0c0473bf8c33cdff34b9018fa3dff12b685d
|