AI-powered codebase intelligence. Ask anything about any GitHub repository and get source-cited answers grounded in the actual code.
GitMind Pro lets you index any public GitHub repository and query it in plain English. Under the hood it:
- Clones the repo (shallow,
depth=1) - Scans source files - 30+ extensions supported, auto-generated lockfiles excluded
- Chunks every file into 80-line overlapping windows
- Embeds each chunk locally using
sentence-transformers/all-MiniLM-L6-v2(no external API for embeddings) - Stores vectors in a local ChromaDB collection
- Retrieves the top-6 most relevant chunks per query
- Streams a source-cited answer via Groq LLaMA 3.1 8B Instant (or OpenAI as fallback)
Everything runs locally except LLM inference. No data leaves your machine beyond the chat request.
| Component | Technology |
|---|---|
| Backend | FastAPI, Uvicorn, Pydantic v2 |
| Vectors | ChromaDB (local persistent HNSW) |
| Embeddings | sentence-transformers all-MiniLM-L6-v2 |
| LLM | Groq LLaMA 3.1 8B Instant, OpenAI GPT-4o-mini (fallback) |
| Git | GitPython (shallow clone) |
| Frontend | React 18, Vite, Three.js, React Router |
| Deployment | Docker Compose (backend, frontend, PostgreSQL, Redis) |
- Python 3.10+
- Node.js 20+
- A Groq API key (free tier works)
cd backend
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS / Linux
pip install -r requirements.txt
cp .env.example .env # fill in GROQ_API_KEY
uvicorn app.main:app --reload --port 8000The embedding model (~90 MB) downloads automatically on first run and is cached locally.
cd frontend
npm install
npm run dev # http://localhost:5173| Variable | Where | Required |
|---|---|---|
GROQ_API_KEY |
backend/.env |
Yes (or OPENAI_API_KEY) |
VITE_API_BASE_URL |
frontend/.env |
No - defaults to http://localhost:8000 |
docker compose up --buildStarts backend (:8000), frontend (:5173), PostgreSQL (:5432), Redis (:6379).
- Open
http://localhost:5173 - Click Index a Repository, paste a public GitHub URL
- Watch the real-time progress: clone -> scan -> embed -> done
- Switch to the Chat tab and ask anything:
- How does authentication work?
- What is the overall architecture?
- Where is the database connection configured?
- Every answer includes file path + line number citations
GitMind/
+- backend/
| +- app/
| | +- main.py # FastAPI entry point
| | +- core/config.py # Pydantic settings
| | +- api/routes/ # REST + SSE endpoints
| | +- services/ # IndexingService, RAGService, etc.
| | +- storage/ # JSON state store with advisory lock
| | +- vector/ # ChromaDB client
| | +- requirements.txt
+- frontend/
| +- src/
| +- pages/LandingPage.jsx # Scroll-driven Three.js story
| +- pages/AppPage.jsx # Main app shell
| +- components/ # ChatView, RepoOverview, Cursor, etc.
| +- services/api.js # HTTP + SSE client
+- docker-compose.yml
+- README.md
+- gitmind.md # Full technical reference
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Health check |
GET |
/api/repositories/ |
List all indexed repositories |
POST |
/api/repositories/index/stream |
Index repo with SSE progress |
GET |
/api/repositories/{id} |
Get repository metadata |
POST |
/api/chat/stream |
Stream RAG chat response |
Full API docs at http://localhost:8000/docs (FastAPI auto-generated Swagger UI).
- Local-first - embeddings and vector search run entirely on your machine
- No duplicate repos - re-indexing the same URL replaces the existing entry (URL-based deduplication)
- Lockfile exclusion -
package-lock.json,yarn.lock,Cargo.locketc. are skipped to prevent token overflow - Token budget - retrieval capped at 6 chunks to stay within Groq's free-tier 12K TPM limit
- Crash-safe writes - state uses atomic rename (
os.replace) on every write - Tab state preserved - chat messages survive tab switches via
display:none(no unmount)
- Multi-turn conversation history
- Private repository support (GitHub PAT)
- AST-based semantic chunking (tree-sitter already installed)
- Incremental re-indexing via git diff
- Background indexing via Celery workers
- PostgreSQL multi-user persistence
- GitLab / Bitbucket support
MIT