๐ง RepoMind
Understand any GitHub repository with AI.
RepoMind is an AI-powered developer tool that analyzes any public GitHub repository and lets you have an evidence-based conversation with it. Paste a repository URL, and RepoMind clones it safely, understands its architecture, tech stack, APIs, and database, generates a structured report โ and then answers your questions by actually searching and reading the code.
Features
- One-click repository analysis โ URL in, structured report out: overview, tech stack, file structure, entry points, architecture, data flow, important files, dependencies, APIs, database, setup guide, and AI insights.
- Agent-style chat ("Ask RepoMind") โ not a single LLM call. The agent
decides which tools to use (
search_repository,read_file,semantic_search,find_api_endpoints, ...) and answers from real evidence, citing file paths and functions. - Semantic code retrieval โ code is chunked on function/class boundaries, embedded (Gemini or any OpenAI-compatible API), and stored in a persistent ChromaDB vector store, so large repositories are searched, not dumped into the model.
- Smart filtering โ ignores
.git, images, binaries, lock files, generated files, and oversized files; prioritizes README โ configs โ entry points โ core source. - Hallucination-resistant โ if the repository has no evidence for a claim, RepoMind says so instead of inventing it.
- Architecture diagram โ a Mermaid diagram generated from the detected entry points, API endpoints, and database usage.
- Disk cache โ analyses are cached per commit SHA; re-opening the same repository is instant.
- Safe by design โ repository code is never executed, installed, or passed to a shell; only read and analyzed.
Architecture
Streamlit UI (app.py)
โ
โผ
RepositoryAnalyzer (orchestrator)
โ โโโโโโโโโโโโโโโโโโโโโโโโ
โโโโบ github_client โ URL validation, REST API metadata,
โ โโโโโโโโโโโโโโโโโโโโโโโ safe shallow clone
โ โโโโโโโโโโโโโโโโโโโโโโโโ
โโโโบ analyzers/ โ deterministic: dependencies, entry
โ โโโโโโโโโโโโโโโโโโโโโโโ points, API routes, DB code, ranking
โ โโโโโโโโโโโโโโโโโโโโโโโโ
โโโโบ retrieval/ โ code-aware chunker + ChromaDB store
โ โโโโโโโโโโโโโโโโโโโโโโโ (embeddings)
โ โโโโโโโโโโโโโโโโโโโโโโโโ
โโโโบ agents/ โ tool registry + ReAct-style loop
โโโโโโโโโโโโโโโโโโโโโโโ (LLM function calling)
The agent loop works like this: the user question plus a system prompt ("answer only from repository evidence") is sent to the LLM along with the tool schemas. The model returns a function call, the agent executes the real tool against the local clone / vector store, feeds the result back, and repeats until the model produces a final answer (capped at 8 iterations). Tools are plain Python functions โ adding a tool means adding one function and one schema entry.
Tech Stack
| Layer | Technology |
|---|---|
| Desktop UI | Streamlit |
| Web UI | FastAPI + vanilla HTML/CSS/JS (Cobalt design system) |
| CLI | repomind console script, wrapped by an npm launcher (npx repomind-ai) |
| LLM | Google Gemini (default) or any OpenAI-compatible API (OpenAI, NVIDIA) via a pluggable client |
| Embeddings | Gemini embedding model (or nvidia/nv-embed-v1 via the OpenAI client) |
| Vector store | ChromaDB (persistent, cosine similarity) |
| Repo access | GitHub REST API + shallow git clone (depth 1) |
| Config | python-dotenv + .env |
Screenshots
Screenshots to be added โ run the app and capture the landing page, the report tabs, and the chat view.
Installation
Requires Python 3.11+ and Git on your PATH.
# 1. Clone or download this repository
git clone https://github.com/your-username/repomind.git
cd repomind
# 2. Create a virtual environment and install dependencies
python -m venv .venv
.venv\Scripts\activate # Windows
source .venv/bin/activate # Linux/macOS
pip install -e .
# 3. Configure environment
copy .env.example .env # Windows
cp .env.example .env # Linux/macOS
Terminal CLI
RepoMind also runs in your terminal (published as repomind-ai; the command is repomind):
# One-time install via uv (installs Python for you if missing)
uv tool install repomind-ai
# Analyze a repository, then chat about it interactively
repomind https://github.com/psf/requests
# Or ask a single question and exit
repomind https://github.com/psf/requests --ask "where is authentication handled?"
# Once published to npm, no-install usage works too:
npx repomind-ai https://github.com/psf/requests
On first run the CLI asks for your Gemini or OpenAI key and saves it to
~/.repomind/config.env. Override providers/models with --provider and
--model.
Website
A self-hostable web app built on FastAPI. It serves the same analyzer through a job-based API and ships with a dependency-free static frontend.
# Install server extras and run locally
pip install -e ".[server]"
uvicorn server.main:app --reload
# open http://localhost:8000
API surface:
| Endpoint | Purpose |
|---|---|
POST /api/analyze {url, api_key?} |
Start an analysis job, returns {job_id} |
GET /api/jobs/{id} |
Poll status + current pipeline stage |
GET /api/report/{id} |
Full structured report (JSON) |
POST /api/ask {job_id, question, api_key?} |
Ask the agent; answers cite files |
Hybrid key model: visitors without a key use the server's shared key under
per-IP daily limits (REPOMIND_DAILY_ANALYZES, default 5; REPOMIND_DAILY_QUESTIONS,
default 40). Pasting your own Gemini/OpenAI key in the UI bypasses the limits;
keys stay in the browser session and are never persisted server-side.
Deployment
The included Dockerfile builds one container that serves the frontend, API,
and worker threads (Python 3.12 slim + git).
Deploy to Render / Fly.io / Railway:
- Push this repository to GitHub.
- Create a Web Service from the repo โ the host detects the Dockerfile
(Render/Railway) or use
fly launch(Fly.io). - Set environment variables on the host:
GEMINI_API_KEY(orOPENAI_API_KEY+OPENAI_BASE_URL) โ the shared keyGITHUB_TOKEN(optional, raises GitHub API limits)
- Deploy. The cache lives at
/tmp/repomindinside the container and is disposable โ a cold cache simply means the next analysis re-clones.
Continuous delivery: tagging a release (git tag v0.1.0 && git push --tags)
triggers .github/workflows/publish.yml, which publishes the Python package to
PyPI (trusted publishing) and the npm launcher to npmjs.com. One-time setup:
add the PyPI trusted publisher for this repo (workflow publish.yml,
environment pypi) and store an npm automation token as the NPM_TOKEN
secret. CI (pytest on Linux/macOS/Windows ร Python 3.11/3.12) runs on every
push via .github/workflows/ci.yml.
Environment Variables
| Variable | Required | Default | Purpose |
|---|---|---|---|
LLM_PROVIDER |
No | gemini |
gemini or openai (OpenAI/NVIDIA-compatible) |
EMBEDDING_PROVIDER |
No | (= LLM_PROVIDER) |
Override the embedding provider separately (e.g. NVIDIA embeddings + Gemini chat) |
GEMINI_API_KEY |
For Gemini | โ | Free key from aistudio.google.com |
OPENAI_API_KEY |
For OpenAI | โ | OpenAI or NVIDIA (nvapi-...) key |
OPENAI_BASE_URL |
For NVIDIA | https://api.openai.com/v1 |
Set to https://integrate.api.nvidia.com/v1 for NVIDIA |
OPENAI_MODEL |
No | gpt-4o-mini |
Chat model for the OpenAI client |
OPENAI_EMBEDDING_MODEL |
No | text-embedding-3-small |
Embeddings for the OpenAI client (NVIDIA: nvidia/nv-embed-v1) |
GITHUB_TOKEN |
No | โ | Raises GitHub API rate limits (60/hr โ 5000/hr) |
REPOMIND_CACHE_DIR |
No | ~/.repomind |
Where clones/reports/vectors persist |
REPOMIND_MAX_REPO_MB |
No | 500 |
Max repository size |
REPOMIND_MAX_FILES |
No | 200 |
Max files analyzed per repo |
REPOMIND_TOP_K |
No | 8 |
Semantic search result count |
REPOMIND_DAILY_ANALYZES |
No | 5 |
Website: per-IP daily analyses on the shared key |
REPOMIND_DAILY_QUESTIONS |
No | 40 |
Website: per-IP daily questions on the shared key |
Note on free tiers: Gemini's free tier works reliably for chat but limits embedding requests (
gemini-embedding-001, ~100 requests/min). NVIDIA's free tier authenticates and provides embeddings (nvidia/nv-embed-v1) but chat completions time out. A practical combination: Gemini for chat + NVIDIA for embeddings โ setEMBEDDING_PROVIDER=openaiwith the NVIDIA key/base URL. OpenCode Zen (https://opencode.ai/zen/v1,sk-...key) also works as an OpenAI-compatible chat provider โ e.g.OPENAI_MODEL=hy3-free(free models are rate-limited per account). The OpenAI client is also fully usable with a paid OpenAI key.
Running Locally
streamlit run app.py
Open the printed URL (default http://localhost:8501), paste a public GitHub
repository URL, and click Analyze Repository.
Example Usage
- Enter
https://github.com/psf/requests - RepoMind clones it, builds the report (~1โ3 min depending on repo size), and shows the tabs.
- In ๐ฌ Ask RepoMind, try:
- "What does this project do?"
- "Where is authentication implemented?"
- "Explain the architecture."
- "Which database is being used?"
- "What files should I read first if I'm new to this project?"
Answers cite evidence, e.g.:
Authentication lives in
requests/auth.pyโHTTPBasicAuth.__call__(), which sets theAuthorizationheader on each request.
If a claim cannot be supported by the repository, you'll see: "I couldn't find evidence for this in the repository."
Project Structure
โโโ app.py # Streamlit UI (desktop/local)
โโโ pyproject.toml # packaging; console script `repomind`
โโโ Dockerfile # web deployment container
โโโ .github/workflows/ # CI (pytest) + publish (PyPI/npm)
โโโ repomind/
โ โโโ config.py # env vars, limits, paths
โ โโโ github/github_client.py # URL validation, API, safe clone
โ โโโ analyzers/
โ โ โโโ repository_analyzer.py # orchestration, tree, ranking, mermaid
โ โ โโโ dependency_analyzer.py # manifests & tech stack
โ โ โโโ code_analyzer.py # entry points, API routes, DB code
โ โโโ retrieval/
โ โ โโโ chunker.py # code-aware chunking
โ โ โโโ vector_store.py # ChromaDB persistence + search
โ โโโ agents/repository_agent.py # tool registry + agent loop + report
โ โโโ cli/ # terminal entry point (rich TUI)
โ โโโ llm/gemini_client.py # Gemini wrapper, retries, embeddings
โ โโโ utils/helpers.py # logging, safe subprocess, file guards
โโโ server/
โ โโโ main.py # FastAPI: analyze jobs, ask endpoint
โ โโโ ratelimit.py # per-IP daily limits (shared key)
โ โโโ static/ # frontend (tokens.css / styles.css / app.js)
โโโ npm/ # `npx repomind-ai` launcher (bootstraps uv)
โโโ tests/ # pytest suite
โโโ docs/superpowers/specs/ # design specifications
Testing
.venv\Scripts\python -m pytest -q
Limitations
- Analyzes public repositories only (private repos are refused by design).
- Free-tier Gemini rate limits apply; a Pro model can be set via
REPOMIND_CHAT_MODEL. - Repos over 500 MB (configurable) are refused before cloning.
- Heuristic detection of API endpoints and database code covers common frameworks (FastAPI, Flask, Django, Express, Spring, etc.); exotic frameworks may be partially detected.
- Analysis time scales with repository size (bounded by
REPOMIND_MAX_FILES).
Future Improvements
- GitHub PR / commit-history analysis
- Code-quality and security-vulnerability scanning
- Repository comparison and developer-onboarding mode
- Automatic documentation generation
- "Explain this code like I'm a beginner" mode
- Deeper architecture visualization (per-module diagrams)
License
MIT
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 repomind_ai-0.1.0.tar.gz.
File metadata
- Download URL: repomind_ai-0.1.0.tar.gz
- Upload date:
- Size: 40.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b1af4751a47dc325ded32371c40805ffe6629ab7f1172cc1488f8ec2cd17378
|
|
| MD5 |
7df7a1893dea82a076622c2afafb80e5
|
|
| BLAKE2b-256 |
474654a6adab81d9c56df695b61b496bfc58d49645becbe91a053708ff3917db
|
Provenance
The following attestation bundles were made for repomind_ai-0.1.0.tar.gz:
Publisher:
publish.yml on rohitsai2911-git/Repomind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repomind_ai-0.1.0.tar.gz -
Subject digest:
9b1af4751a47dc325ded32371c40805ffe6629ab7f1172cc1488f8ec2cd17378 - Sigstore transparency entry: 2559941336
- Sigstore integration time:
-
Permalink:
rohitsai2911-git/Repomind@e8736ca3d93c5441be93652a88d86730ba000ba5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rohitsai2911-git
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8736ca3d93c5441be93652a88d86730ba000ba5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file repomind_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: repomind_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c4db5284543b8d407707a25985f14e8f3dbfcbdd0de0e4371f3447a98f18500
|
|
| MD5 |
a62b1d36cb4a0799a9e50a57fade789c
|
|
| BLAKE2b-256 |
d1326c9eccb5c832137f8f18619cb5f3bafdce6af4fd2b295ce58cce1563a3f3
|
Provenance
The following attestation bundles were made for repomind_ai-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on rohitsai2911-git/Repomind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repomind_ai-0.1.0-py3-none-any.whl -
Subject digest:
4c4db5284543b8d407707a25985f14e8f3dbfcbdd0de0e4371f3447a98f18500 - Sigstore transparency entry: 2559942129
- Sigstore integration time:
-
Permalink:
rohitsai2911-git/Repomind@e8736ca3d93c5441be93652a88d86730ba000ba5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rohitsai2911-git
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8736ca3d93c5441be93652a88d86730ba000ba5 -
Trigger Event:
push
-
Statement type: