Skip to content

zebbern/repolens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

239 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepoLens

AI-powered GitHub repository analysis — just add m before any github.com URL

GitHub Stars Latest Release MIT License

Website · Quick Start · Features · AI Providers

repolens-show.mp4

Pro tip: Turn any GitHub URL into a RepoLens analysis by adding m before github.com. For example: github.com/facebook/reactmgithub.com/VrianCao/Uptimer


Features

  • Repository Overview — Instant project summary, tech stack detection, and interactive file tree visualization
  • Code Browser — Syntax-highlighted source viewer powered by Shiki, with file outline and breadcrumb navigation
  • Issues Scanner — Automated code quality analysis that detects security vulnerabilities, performance problems, and best practice violations
  • Diagrams — Auto-generated architecture diagrams using Mermaid.js — dependency graphs, component relationships, and more
  • Documentation Generator — AI-powered docs generation including README, Architecture Overview, API Reference, and Contributing Guide
  • AI Chat — Ask questions about any codebase with full context awareness and 9 specialized AI tools for deep analysis
  • Compare — Side-by-side repository comparison with similarity/clone detection scoring to evaluate alternatives
  • Git Insights — Coding hours estimation, activity punchcard, and per-author contribution charts derived from commit history

How It Works

  1. Navigate to mgithub.com/owner/repo (or paste any GitHub URL on the homepage)
  2. RepoLens fetches the entire repo via GitHub's Zipball API in a single download
  3. Files are indexed and cached in IndexedDB for instant repeat visits
  4. All tabs become available — browse code, scan issues, generate docs, chat with AI

Supported AI Providers

RepoLens works with multiple AI providers. You configure API keys directly in the app — no environment variables needed.

Provider Example Models
OpenAI Latest Models
Google Latest Models
Anthropic Latest Models
OpenRouter Latest Models

GitHub Personal Access Token

Add a GitHub Personal Access Token (PAT) to access private repositories and raise the API rate limit from 60 to 5,000 requests/hour. When a PAT is configured, GitHub API calls go directly from your browser to api.github.com — the token never touches the RepoLens server.

How to Configure

  1. Create a fine-grained PAT on GitHub.
  2. Grant Contents: Read-only and Metadata: Read-only permissions (select only the repositories you need, or choose All repositories).
  3. In RepoLens, click the gear icon (Settings) → GitHub tab → paste your token → Test Connection.

Recommended Scopes

Goal Scope
Private repository access Contents: Read-only + Metadata: Read-only
Public repos (higher rate limit only) No additional permissions needed

Security

  • The token is stored in your browser's localStorage — same as AI API keys.
  • API calls are made directly from the browser over HTTPS; the token is never sent to the RepoLens server.
  • Already signed in with OAuth? OAuth continues to work through server-side proxy routes. You can use either method, or both.

Quick Start

Prerequisites

Requirement Install Verify
Node.js 18+ nodejs.org node -v
pnpm pnpm.io pnpm -v
AI API key At least one: OpenAI, Google AI, Anthropic, or OpenRouter

Setup

git clone https://github.com/zebbern/repolens.git
cd repolens/workproject
pnpm install
pnpm dev

Open http://localhost:3000, click the gear icon (Settings), and enter your API key(s).

Environment Variables (Optional)

Variable Description
NEXT_PUBLIC_AUTH_ENABLED=true Enable authentication (requires NextAuth setup)

AI keys are configured in the UI — no environment variables required for basic usage.


Usage

Action How
Analyze a repo Add m before any github.com URL → mgithub.com/owner/repo
Paste a URL Enter any GitHub repo URL on the homepage
Browse code Open the Code tab to view syntax-highlighted files with outline navigation
Scan for issues Open the Issues tab for automated security and quality analysis
Generate docs Open the Docs tab and select a document type
Chat with AI Open the Chat tab and ask questions about the codebase
Compare repos Navigate to the Compare tab to evaluate repositories side-by-side
View git insights Open the Git History tab → Insights sub-tab for coding hours, activity heatmaps, and author charts

Tech Stack

Category Technology
Framework Next.js 15 (App Router)
UI React 19, Tailwind CSS, shadcn/ui
Language TypeScript 5
AI Vercel AI SDK v6
Diagrams Mermaid.js
Syntax highlighting Shiki
Repo extraction fflate
Testing Vitest, Playwright
Deployment Vercel

Contributing

  1. Fork the repo and create a branch.
  2. Make your changes.
  3. Run pnpm test to verify.
  4. Open a pull request.