A local AI assistant that helps developers remember and search their own codebase.
Developers work on multiple projects and often forget where they wrote a specific function, how a feature was implemented, or where a certain logic exists. DevMemory AI solves this by creating a searchable memory of your code using embeddings, vector search, and a local LLM.
The project runs locally, meaning your code stays on your machine.
- 🔍 Search your codebase using natural language
- 🧠 AI-powered answers based on your own code
- 💾 Local vector memory using ChromaDB
- 🤗 Hugging Face embeddings for semantic search
- 🦙 Local Llama model support through Ollama
- ⚡ Fast terminal-based workflow
- 🔒 Privacy-focused (no code upload required)
DevMemory AI follows a simple RAG (Retrieval-Augmented Generation) pipeline.
Your Code
|
↓
File Scanner
|
↓
Code Parser
|
↓
Hugging Face Embeddings
|
↓
ChromaDB Vector Database
|
↓
Semantic Search
|
↓
Llama Local Model
|
↓
AI Answer
Instead of manually searching:
Where did I create authentication?
You can ask:
devmemory ask "Where is authentication implemented?"DevMemory searches your stored code and explains the relevant files.
DevMemory-AI/
│
├── app/
│ │
│ ├── ai.py # Handles Llama AI responses
│ ├── cli.py # Terminal commands
│ ├── embeddings.py # Creates vector embeddings
│ ├── parser.py # Reads and processes code files
│ ├── scanner.py # Finds project files
│ └── vector_store.py # ChromaDB operations
│
├── vector_db/ # Local vector database (generated)
│
├── main.py # Application entry point
├── requirements.txt # Python dependencies
├── .env.example # Environment variable example
├── .gitignore
├── LICENSE
└── README.md
git clone https://github.com/Himalsed/DevMemory-AI.gitMove into the project:
cd DevMemory-AIpython -m venv .venvActivate it:
source .venv/bin/activate.venv\Scripts\activatepip install -r requirements.txtDevMemory uses Ollama to run Llama locally.
Install Ollama:
Download the model:
ollama pull llama3.2Check:
ollama listCreate a .env file:
cp .env.example .envAdd your Hugging Face token:
HF_TOKEN=your_token_hereThe token is optional for public models but recommended for better download limits.
Go to the project you want DevMemory to remember.
Example:
python main.py index /path/to/projectDevMemory will:
- scan files
- split code into chunks
- create embeddings
- store them in ChromaDB
Example:
python main.py ask "Where is database connection handled?"Example output:
DevMemory AI:
The database connection is handled in:
database.py
The file creates the database client
and manages connection settings.
| Technology | Purpose |
|---|---|
| Python | Main language |
| Typer | CLI interface |
| ChromaDB | Vector database |
| Hugging Face | Text/code embeddings |
| Sentence Transformers | Embedding generation |
| Ollama | Local Llama model |
| RAG | AI retrieval pipeline |
Most code search tools depend on cloud services or require uploading your source code.
DevMemory AI focuses on:
- keeping code private
- running locally
- creating personal AI memory for developers
The goal is to make working with large codebases easier.
- Support more programming languages
- Git history integration
- Automatic documentation generation
- Code explanation command
- VS Code extension
- Team shared memory
This project is licensed under the MIT License.
Feel free to use, modify, and improve it.