AI-powered semantic code search over your own codebase using Tree-sitter + CodeBERT + FAISS + Streamlit
CodeSense lets you perform natural language searches over source code — like "connect to database" or "handle login request" — and retrieve the most semantically relevant functions, not just keyword matches.
Built with:
- Tree-sitter for accurate code parsing
- CodeBERT for semantic embeddings
- FAISS for fast vector search
- Streamlit for interactive UI
✅ Parse source code into meaningful chunks
✅ Embed code semantically using CodeBERT
✅ Perform fast vector similarity search
✅ Interactive Streamlit UI for natural language queries
✅ Plug-and-play: works on any Python repo
codesense/
├── app/ # Streamlit UI
├── backend/ # Parser, Embedding, Search engine
├── data/ # Raw code, processed chunks, embeddings
├── scripts/ # Manual scripts for testing modules
└── README.md
git clone https://github.com/NoxiousTab/codesense.git
cd codesense
python -m venv venv
venv\Scripts\activate # or source venv/bin/activate on Unix
(Only If Required) pip install tree_sitter-0.20.4-cp310-cp310-win_amd64.whl
pip install -r requirements.txt
python backend/parser/build_language.py # to build my-languages.sopython scripts/test_clone.py
python scripts/test_extract_chunks.py
python scripts/test_embed_chunks.py
streamlit run app/ui.py