Skip to content

volotat/InsightCoder

Repository files navigation

InsightCoder

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.

⚠️ Important Privacy Notice: InsightCoder sends your project's source code to an external LLM service (Google Gemini) for analysis. Do not use this tool on repositories containing personal, confidential, or sensitive information.

Screenshot
Project preview

Core Features

  • 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 vs. GitHub Copilot

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.

Getting Started

Requirements:

  • Python 3.8+
  • Git

Installation:

  1. Clone the Repository:

    git clone https://github.com/volotat/InsightCoder
    cd InsightCoder
  2. Set Up Virtual Environment (Recommended):

    python -m venv .venv
    source .venv/bin/activate  # On Windows, use: .venv\Scripts\activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. 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"

Usage

  1. Navigate to the InsightCoder directory:

    cd InsightCoder
  2. Run the script: To analyze the current directory:

    python ask.py
  3. Analyze a specific project: Use the -p or --project-path argument.

    python ask.py -p /path/to/your/project
  4. 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

Example Prompts

  • "Describe the overall architecture of this project."
  • "Explain the ChatWorker class in ask_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?"

Roadmap

For details on planned features and future directions, please see the ROADMAP.md file.

License

InsightCoder is released under the MIT License.

Contributing

Bug reports and questions are welcome! Please open a new issue on GitHub.

About

AI coding assistant that actually helps to build things, not to ruin them.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages