Skip to main content
Glama
01Aniket

github-repository-analyzer

by 01Aniket
README.md
# GitHub Repository Analyzer

An LLM-powered GitHub repository analysis tool that allows users to provide a GitHub repository URL and ask natural-language questions about the repository.

The application retrieves repository information and source code through GitHub APIs exposed as MCP tools, then uses a local LLM to generate answers grounded in the retrieved repository evidence.

---

## Features

- Analyze different GitHub repositories from the terminal
- Accept the repository URL separately from the question
- Ask questions in natural language
- Ask high-level repository questions
- Ask implementation questions about functions and code
- Search repository source code
- Read specific repository files or line ranges
- Retrieve repository metadata
- Retrieve repository file structure
- Use MCP to expose repository operations as tools
- Use LangGraph to manage the analysis workflow
- Use a local LLM through Ollama
- Ground implementation answers in retrieved repository source code
- Retry temporary GitHub API failures

---

## Architecture

```text
                    User
                     |
                     v
                 main.py
                     |
                     v
                LangGraph
                 graph.py
                     |
                     v
                 MCP Client
               mcp_client.py
                     |
                     v
                 MCP Server
               mcp_server.py
                     |
                     v
             repository_tools.py
                     |
                     v
              github_client.py
                     |
                     v
              GitHub REST API
                     |
                     v
          Repository Information
          and Source Code
                     |
                     v
                    LLM
                     |
                     v
                Final Answer