InsightCoder is AI-powered tool that gives you deep insights into your codebases. By leveraging Large Language Models (LLMs), you can ask complex questions about any Git repository—whether it's code, documentation, or a book—and get intelligent, context-aware answers.
It was born out of the need for a powerful codebase analysis tool during the development of the Anagnorisis project.
- Holistic Project Analysis: Analyzes your entire Git repository, including uncommitted changes, to provide comprehensive context.
- Persistent Memory: Saves conversation summaries to maintain context across sessions, enabling follow-up questions.
- Large Context Models: Uses LLMs with large context windows (e.g., Gemini 2.5 Pro) to understand complex projects.
- Interactive Chat UI: A simple terminal-based UI for asking questions and receiving Markdown-formatted responses with syntax highlighting.
- Real-time Token Counter: Helps you monitor the context size of your conversation.
InsightCoder complements tools like GitHub Copilot. They serve different primary purposes:
Feature | InsightCoder | GitHub Copilot |
---|---|---|
Primary Purpose | Codebase Understanding & High-Level Insights | Real-time Code Completion & Generation |
Context Scope | Entire Project Codebase + History | Current File & Immediate Context |
Best For | Architecture questions, onboarding, refactoring ideas | Writing code, boilerplate, line-by-line assistance |
Use InsightCoder for deep analysis and understanding. Use Copilot for accelerating development.
Requirements:
- Python 3.8+
- Git
Installation:
-
Clone the Repository:
git clone https://github.com/volotat/InsightCoder cd InsightCoder
-
Set Up Virtual Environment (Recommended):
python -m venv .venv source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Configure API Key: Get a Google Gemini API key from Google AI Studio and set it as an environment variable:
export GEMINI_API_KEY="YOUR_API_KEY_HERE"
-
Navigate to the InsightCoder directory:
cd InsightCoder
-
Run the script: To analyze the current directory:
python ask.py
-
Analyze a specific project: Use the
-p
or--project-path
argument.python ask.py -p /path/to/your/project
-
Use a custom conversation folder: By default, conversations are saved in
<project-path>/project_info/conversations
. Use-c
or--conversation-path
to change this.python ask.py -p /path/to/your/project -c /path/to/your/conversations
- "Describe the overall architecture of this project."
- "Explain the
ChatWorker
class inask_src/worker.py
." - "Are there any potential performance bottlenecks in
ask_src/chat_utils.py
?" - "Suggest refactoring strategies for
ask_src/ui.py
." - "Generate a class diagram for the main classes and their relationships."
- "How are API keys handled in this project?"
For details on planned features and future directions, please see the ROADMAP.md file.
InsightCoder is released under the MIT License.
Bug reports and questions are welcome! Please open a new issue on GitHub.