An intelligent chatbot that helps you understand and explore GitHub repositories through natural language conversations. Built with Next.js, Mastra AI, and powered by Google's Gemini 2.5 Flash.
- 🤖 Intelligent Repository Analysis - Ask questions about any public GitHub repository
- 💬 Multi-Thread Conversations - Maintain separate conversation threads for different repositories
- 🔍 Deep Code Understanding - Analyze repository structure, file contents, commits, issues, and pull requests
- 💾 Persistent Memory - Conversations are saved and can be resumed anytime
- ⚡ Real-time Streaming - Get responses as they're generated
- Node.js 20+ (recommended) or Bun
- Docker and Docker Compose
- A GitHub account (no token required for public repos)
- A Google AI API key (for Gemini)
Create a .env file in the project root:
# Google AI API Key (get from https://aistudio.google.com/apikey)
GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_api_key_here
# Optional: GitHub Personal Access Token (for higher rate limits)
# GITHUB_TOKEN=your_github_token_heredocker compose upThis will start a PostgreSQL 16 instance in a Docker container with persistent storage and run the development server with hot reloading. Open http://localhost:3000 in your browser.
The node module dependencies will be installed automatically on the first run.
You can enable SSL for PostgreSQL database by setting DB_SSL=true in the .env file, else it will default to false.
- Enter a Repository: Type a GitHub repository in the format
owner/repo(e.g.,facebook/react) - Start Chatting: Ask questions about the repository:
- "What is the project structure?"
- "How does authentication work?"
- "Show me the latest commits"
- "What are the open issues?"
- Multiple Threads: Create new conversation threads for the same repository or switch between different repositories
The AI agent has access to the following tools:
- getFilePaths: Retrieves the complete file structure of a repository
- getFileContent: Fetches the content of specific files
- getRepositoryCommits: Analyzes commit history and recent changes
- getRepositoryIssues: Examines open and closed issues
- getRepositoryPullRequests: Reviews pull requests and code changes