Skip to main content

Give Claude Code a brain for your entire codebase. Index once, ask anything.

Project description

๐Ÿง  RepoMind

Give Claude Code a brain for your entire codebase.

Index once. Ask anything. Never explain your code to AI again.

PyPI version CI Python License: MIT Claude Code Plugin Stars


The Problem

You open Claude Code, paste half your codebase into the chat, and still get hallucinated function names.

You're not giving AI a codebase โ€” you're giving it a dump. AI needs understanding, not just text.

The Solution

RepoMind builds a semantic brain for your repo. Every file, chunked and embedded locally. Ask it anything โ€” it finds exactly what's relevant and feeds that to the AI.

repomind index .
repomind ask "How does authentication work?"

That's it.


โšก Quickstart

pip install repomind-cli

cd your-project/
repomind index .
repomind ask "Where is the payment logic?"

No API key needed. Works fully offline. Add ANTHROPIC_API_KEY or OPENAI_API_KEY to unlock AI-generated answers.


๐Ÿ”Œ Claude Code Plugin

RepoMind ships with a first-class Claude Code MCP plugin โ€” Claude automatically gets your codebase context before answering any question.

# Install the plugin (once)
bash plugin/install.sh

# Claude now has 5 new tools:
# repomind_ask ยท repomind_explain ยท repomind_overview ยท repomind_index ยท repomind_doctor

Claude Code will automatically call these tools when you ask about your code โ€” no manual prompting needed.

Slash Commands

Drop .claude/commands/ into any project and get instant slash commands:

Command What it does
/repomind-ask <question> Semantic search + grounded answer
/repomind-explain <file> Purpose, functions, flow of any file
/repomind-overview Full project map with module descriptions

What You Get

$ repomind ask "How does the auth flow work?"

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“ Relevant Files โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
- src/auth/middleware.py
- src/auth/jwt.py
- src/users/service.py

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“ Memory โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
- Auth uses JWT stored in HttpOnly cookies
- Tokens expire after 24h

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“„ Code Snippets โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
src/auth/middleware.py:12-48
  def validate_token(request):
    ...

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿง  Answer โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Auth flow: request โ†’ JWT middleware โ†’ token validation โ†’
user lookup โ†’ route handler. Tokens are stored in
HttpOnly cookies and validated on every request.

All Commands

Command Description
repomind index . Build semantic index for current repo
repomind index . --update Re-index only changed files (fast)
repomind ask "<question>" Ask anything about the codebase
repomind ask "<question>" --format prompt Get a paste-ready AI prompt
repomind explain <file> Deep-dive any file
repomind overview Project structure + module map
repomind remember "<note>" Save a note to codebase memory
repomind remember List all saved notes
repomind forget <id> Remove a note
repomind doctor Check setup and environment

๐Ÿง  Memory

RepoMind has persistent memory per repo. Notes you save are automatically included in every future ask query โ€” both in the output and in the LLM prompt.

repomind remember "Auth uses JWT stored in HttpOnly cookies"
repomind remember "Postgres 15 โ€” schema lives in db/migrations/"
repomind remember "Never call UserService directly, go through the API layer"

repomind ask "How do I add a new endpoint?"
# โ†’ Answer is grounded in your code + your notes

Notes are stored in .repomind/memory.json โ€” plain JSON, easy to commit or gitignore.


Free vs Premium

Feature Free (no key) Premium (API key)
Semantic file retrieval โœ… โœ…
Code snippets with line numbers โœ… โœ…
Memory injection โœ… โœ…
Project overview โœ… โœ…
AI-generated answers โŒ โœ…
File explanations (AI) โŒ โœ…
Module summaries (AI) โŒ โœ…

Free mode is fully useful. Premium mode adds natural language answers on top.

Set either key to activate:

export ANTHROPIC_API_KEY=sk-ant-...   # preferred
export OPENAI_API_KEY=sk-...          # also works

How It Works

repomind index .

  1. FileScanner   โ€” walks your repo, skips binaries/noise
  2. CodeChunker   โ€” splits files into overlapping chunks
  3. Embedder      โ€” encodes chunks with all-MiniLM-L6-v2 (local)
  4. FAISS         โ€” stores vectors in .repomind/index.faiss

repomind ask "..."

  1. Embed question  โ†’ same local model, no network call
  2. FAISS search    โ†’ top-k most relevant chunks
  3. LLM (optional)  โ†’ grounded answer with citations

Everything lives in .repomind/ inside your project. No global state. No cross-repo leakage.


Configuration

Optional config file at .repomind/config.toml:

# Use a different embedding model
embedding_model = "sentence-transformers/all-MiniLM-L6-v2"

# Max file size to index (default: 1MB)
max_file_size_bytes = 1048576

All settings can also be set via environment variables:

REPOMIND_EMBEDDING_MODEL=...
REPOMIND_MAX_FILE_SIZE_BYTES=...
ANTHROPIC_API_KEY=...
OPENAI_API_KEY=...

Installation

# Stable release
pip install repomind-cli

# Latest from source
pip install git+https://github.com/MBilalShabbir/repomind.git

Requirements: Python 3.10+


Claude Code Plugin โ€” Full Setup

For teams that use Claude Code as their primary AI IDE:

# 1. Clone the repo (or copy the plugin/ folder)
git clone https://github.com/MBilalShabbir/repomind.git

# 2. Install the MCP plugin
bash repomind/plugin/install.sh

# 3. Index your project
cd your-project/
repomind index .

# 4. Open Claude Code โ€” it now has your full codebase as context

Claude Code gains 5 MCP tools: repomind_ask, repomind_explain, repomind_overview, repomind_index, repomind_doctor.

It also gains 3 slash commands if you copy .claude/commands/ into your project.


Why Star This?

  • ๐Ÿ”’ 100% local embeddings โ€” your code never leaves your machine
  • ๐Ÿง  Persistent memory โ€” notes survive across sessions
  • โšก Claude Code MCP plugin โ€” first-class integration, not an afterthought
  • ๐Ÿ†“ Free mode is real โ€” semantic search works without any API key
  • ๐Ÿ”„ Incremental indexing โ€” only re-embeds changed files
  • ๐Ÿ—‚๏ธ Per-repo isolation โ€” no cross-project contamination

Contributing

Stars, issues, and PRs are welcome.

git clone https://github.com/MBilalShabbir/repomind.git
cd repomind
pip install -e .

If RepoMind saved you from pasting your entire codebase into a chat window, leave a star โญ โ€” it helps more developers find this.


Built by Bilal ยท MIT License

โญ Star on GitHub ยท ๐Ÿ“ฆ PyPI ยท ๐Ÿ› Issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repomind_cli-1.0.0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repomind_cli-1.0.0-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file repomind_cli-1.0.0.tar.gz.

File metadata

  • Download URL: repomind_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for repomind_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c9295002c588e202d1af0ec52b668e4471b416e3f83be4a46333d37b44de4db3
MD5 75f085235c6913994e4a34ca35e8cc72
BLAKE2b-256 909a1bfb0e851dfc47021c1c511313108d2b8132e0ed7a1f6761a415d36c413e

See more details on using hashes here.

Provenance

The following attestation bundles were made for repomind_cli-1.0.0.tar.gz:

Publisher: publish.yml on MBilalShabbir/repomind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repomind_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: repomind_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for repomind_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcaebe5b9c847202d2f9bec5d1a968f60deef965aab2e53aefc100e9875a9801
MD5 89966af9e13debd6e8a79066548986ab
BLAKE2b-256 df36b97aab5e7c0493a722b73e4284aac32d3b8c9a680040979c8cfd648391d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for repomind_cli-1.0.0-py3-none-any.whl:

Publisher: publish.yml on MBilalShabbir/repomind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page