RepoPilot AI
RepoPilot turns any public repository into something you can actually understand. Paste a URL, and it downloads the code, maps the architecture, indexes the files, and gives you an AI assistant that reads the real source before answering.
What is RepoPilot?
RepoPilot is an AI-powered codebase intelligence tool. Instead of cloning a repository locally and reading it file by file, you paste a public repository URL and RepoPilot does the heavy lifting server-side:
- It fetches the repository and builds a file tree you can browse.
- It statically analyzes the source with an AST to discover real import/export relationships.
- It renders an architecture graph so you can see modules and how they connect.
- It gives you a chat assistant that answers with file-level context.
Key features
Automated static analysis
Paste a public repository URL and RepoPilot parses the source tree with a real AST to map imports, exports, entry points, and key modules.
Architecture visualization
A live Mermaid graph is rendered from real import edges, clustered into modules so you can see how a codebase fits together at a glance.
Deep-context AI chat
Ask questions in plain English. The model receives the file tree, dependency map, and the file you have selected — then reads the real source before answering.
Large-repo ready
Repositories are fetched as single tarballs and parsed concurrently with capping, so big monorepos stay responsive on serverless runtimes.
Any public git host
GitHub, GitLab, Bitbucket, and Codeberg are all supported. Private repositories are not accepted.
Security first
Code is analyzed, never executed. Strict URL validation and directory-traversal protection keep untrusted input out of the filesystem.
Supported platforms
RepoPilot accepts public repository URLs from GitHub, GitLab, Bitbucket, and Codeberg. The default branch is analyzed. URLs may include a trailing .git.
Analyzed languages
Import relationships are extracted for: TypeScript, JavaScript, TSX, JSX, Python, Java, Go, Rust. Files in other languages are still listed and browsable.
How to use it
- Open the RepoPilot home page.
- Paste a public repository URL, for example
https://github.com/vercel/swr. - Click Analyze repository and wait for the analysis to finish.
- Browse the Overview, Architecture, and Files tabs.
- Ask the chat anything — it already knows the repository structure and the file you have selected.
Security model
- No execution. Repository code is parsed and read, never executed.
- Strict URL validation. Only public URLs on supported hosts are accepted.
- Traversal protection. The file endpoint resolves paths and rejects anything that escapes the repository root.
- Ephemeral storage. Repositories live in a temporary directory and are pruned after an hour of inactivity.
API reference
RepoPilot exposes three server-side endpoints used by the web app.
POST /api/analyze
Accepts gitUrl (a public repository URL) and returns the file tree, dependency map, architecture graph, and summary.
GET /api/file
Accepts repoPath and filePath and returns the raw source of a single file with traversal protection.
POST /api/chat
Accepts message, repositoryAnalysis, and an optional selectedFile, and streams an AI answer with real file-level context.
Self-hosting
RepoPilot is a Next.js app. To run it yourself:
pnpm install
pnpm dev
Set OPENROUTER_API_KEY to enable the chat (without it, analysis and file browsing still work). Optional variables include OPENROUTER_MODEL, OPENROUTER_MAX_TOKENS, ANALYZE_CONCURRENCY, and MAX_ANALYZED_FILES.
FAQ
Does RepoPilot store my repositories?
No. Repositories are downloaded to a temporary directory and removed after about an hour of inactivity. Nothing is written to a database.
Why do very large repositories show fewer architecture edges?
To stay fast on serverless runtimes, dependency parsing is capped (default 3,000 files). Files beyond the cap are still browsable — only deep import edges are skipped.
Which AI model powers the chat?
The chat uses OpenRouter with google/gemini-2.5-flash by default and a 2,048-token output cap.
Can I analyze a private repository?
No. Only public repositories on supported hosts are accepted.