Introducing Codeqai
Codeqai is an innovative tool designed to help developers engage with their codebase through semantic search and interactive chat. It offers a robust and secure platform by keeping everything local, eliminating risks of data leaks. Built using a combination of powerful technologies such as Langchain, Tree-sitter, Sentence-transformers, Instructor-embedding, Faiss, Lama.cpp, Ollama, and Streamlit, Codeqai ensures a seamless and highly efficient experience.
Features
- Semantic Code Search: Find code elements quickly with a semantic search that understands the context and meaning behind the code.
- Interactive Chat: Engage in meaningful conversations with your codebase using a GPT-like chat feature.
- Synchronizing Updates: Easily synchronize the vector database with the latest code modifications to ensure all updates are captured.
- Local Operation: Process everything locally with 100% support for local embeddings and language models like sentence-transformers and llama.cpp.
- Integration Flexibility: Supports integrations with popular services such as OpenAI, Azure OpenAI, and Anthropic, while employing Tree-sitter for parsing code.
Getting Started
To kick off a semantic search within your codebase, simply execute:
codeqai search
For starting a chat session with your code, run:
codeqai chat
To ensure your vector store is up-to-date with the current state of your code, use:
codeqai sync
And to launch the Streamlit application interface, enter:
codeqai app
Installation and Setup
Codeqai requires Python version between 3.9 and before 3.12. Installation is straightforward using pipx
:
pipx install codeqai
Make sure you have the correct Python version. If issues arise during installation, switching to source installation using pip
is also possible. Some packages like faiss-cpu
or faiss-gpu
might require manual installation based on your hardware capabilities.
Configuration
During the initial setup or when running:
codeqai configure
Codeqai will prompt you to configure necessary embeddings and language models. If you need to alter these configurations later, clear the cached files in your system’s .cache
directory for Codeqai.
Supported Languages
Codeqai extends its support across a variety of programming languages including Python, Typescript, JavaScript, Java, Rust, Kotlin, Go, C++, C, C#, and Ruby.
How It Works
Codeqai parses your entire git repository to extract methods and their documentation. This information is stored in a local FAISS vector database. Semantic searches rely on these embeddings to fetch results, while chat interactions are handled using local models such as llama.cpp. Recent changes in the repository trigger synchronization processes that update the vector database as needed.
Troubleshooting
Common installation issues may include errors due to Rust compiler absence or compatibility concerns with Python 3.12. Ensure you have the necessary system tools and correct Python version for a smooth setup. For contributing or extending the project, developers can use conda
, conda-lock
, or poetry
to build and run the project in development mode.
Contribution: Developers are encouraged to contribute by reporting issues or submitting pull requests to expand Codeqai’s capabilities. With an active community of contributors, Codeqai continually evolves to better serve its user base.