Skip to content

Latest commit

ย 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  RepoPilot โ€” Local AI Codebase Engineer

A cartoonish, student-friendly local AI developer tool built by @harshitethic for his college bhais โค๏ธ

RepoPilot lets you paste a public GitHub repository, clone it locally, inspect its structure, search its source code, calculate transparent project-health signals, and ask a local AI engineer questions about how the codebase works.

No OpenAI. No Gemini. No paid API keys.

Everything important runs locally with Git + FastAPI + React + Ollama.


โœจ What RepoPilot does

GitHub Repository
       โ†“
   Git Clone
       โ†“
 Source Indexer
   โ†™    โ†“     โ†˜
Search  Health  File Tree
       โ†“
Relevant Code Context
       โ†“
Ollama + Local LLM
       โ†“
Developer Answer

Main features

  • ๐Ÿ”— GitHub repository cloning
  • ๐ŸŒณ Interactive file tree
  • ๐Ÿ”Ž Real source-code search
  • ๐Ÿง  Ask AI about the codebase
  • ๐Ÿ—๏ธ Architecture explanation
  • โค๏ธ Repository health score
  • ๐Ÿ“Š Language and code statistics
  • ๐Ÿ”’ Local-first AI
  • ๐Ÿšซ No paid AI API
  • ๐Ÿ›ก๏ธ Does not execute cloned repository code
  • ๐ŸŒ™ Dark mode
  • ๐ŸŽจ Cartoonish / meme-ish student UI

๐Ÿ–ผ๏ธ Screenshots

Dashboard

RepoPilot Dashboard

Repository Analysis

Repository Analysis

Ask AI

Ask AI

Code Search

Code Search

Architecture

Architecture

File Tree

File Tree


๐Ÿค– Local AI

RepoPilot uses Ollama instead of a paid cloud AI API.

Recommended starter model:

llama3.2:1b

Install it:

ollama pull llama3.2:1b

Run it:

ollama run llama3.2:1b

You can also change the model through the OLLAMA_MODEL environment variable.

For example:

$env:OLLAMA_MODEL="llama3.2:3b"

A larger model can provide better explanations if your machine has enough RAM.


๐Ÿ› ๏ธ Tech Stack

Layer Technology
Frontend React
Build tool Vite
Backend FastAPI
Language Python
Local AI Ollama
LLM Llama 3.2
Git operations Git CLI
HTTP REST API
Styling Custom CSS
Icons Lucide React

๐Ÿ’ป Requirements

Recommended:

  • Windows / macOS / Linux
  • Python 3.12
  • Node.js 18+
  • Git
  • Ollama
  • 8 GB RAM recommended
  • Internet connection for cloning public GitHub repositories

Python 3.12 is recommended for a predictable backend setup.


๐Ÿš€ Installation

1. Clone RepoPilot

git clone https://github.com/harshitethic/RepoPilot.git
cd RepoPilot

๐Ÿง  2. Install Ollama

Install Ollama, then:

ollama pull llama3.2:1b

Test it:

ollama run llama3.2:1b

Keep Ollama running.


๐Ÿ 3. Backend

Create a Python environment:

py -3.12 -m venv .venv

Activate it:

.venv\Scripts\Activate.ps1

Upgrade pip:

python -m pip install --upgrade pip

Install dependencies:

pip install -r backend
equirements.txt

Start FastAPI:

cd backend
python -m uvicorn app:app --host 127.0.0.1 --port 8000

You should see:

Uvicorn running on http://127.0.0.1:8000

Keep this terminal open.


๐ŸŒ 4. Frontend

Open another terminal:

cd frontend
npm install
npm run dev

Open:

http://localhost:5173

๐Ÿงฉ Recommended 3-terminal setup

Terminal 1 โ€” Ollama

ollama run llama3.2:1b

Terminal 2 โ€” Backend

.venv\Scripts\Activate.ps1
cd backend
python -m uvicorn app:app --host 127.0.0.1 --port 8000

Terminal 3 โ€” Frontend

cd frontend
npm install
npm run dev

Then visit:

http://localhost:5173

๐Ÿงช Try it

Paste a public GitHub repository such as:

https://github.com/fastapi/fastapi

Then click:

Analyze repository

After indexing, try:

Ask AI

Where is the main application entry point?
How does the API request flow work?
Where is authentication handled?
Where is the database connection created?

Code Search

Search for:

router

or:

authentication

or:

FastAPI

Architecture

Click:

Explain architecture

RepoPilot will send relevant repository context to the local Ollama model and generate an explanation.


โค๏ธ Repository Health

RepoPilot intentionally uses a transparent heuristic instead of pretending an AI-generated number is an objective engineering metric.

It checks signals such as:

  • README
  • Tests
  • .gitignore
  • Package/dependency manifest
  • GitHub Actions / CI
  • Docker configuration
  • Source files
  • Project size

For example:

Repository Health

60 / 100

โœ“ README
โœ“ Package / Manifest
โœ— Tests
โš  .gitignore
โœ— CI / CD Workflow
โœ— Docker Support

The score is not a security audit.

It is simply a quick project-quality signal.


๐Ÿ”’ Security & privacy

RepoPilot is deliberately conservative.

It does:

  • Clone public GitHub repositories
  • Read source/documentation files
  • Search source code
  • Send selected code context to your local Ollama server

It does NOT:

  • Execute cloned repository code
  • Run npm install inside the cloned repository
  • Run arbitrary repository scripts
  • Require OpenAI/Gemini API keys
  • Upload your repository to a cloud AI service

The local clone directory is ignored by Git:

backend/repos/

๐Ÿ“ Project Structure

RepoPilot/
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app.py
โ”‚   โ”œโ”€โ”€ requirements.txt
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ repos/
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ services/
โ”‚       โ”œโ”€โ”€ analyzer.py
โ”‚       โ”œโ”€โ”€ github.py
โ”‚       โ””โ”€โ”€ ollama.py
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ vite.config.js
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ main.jsx
โ”‚       โ””โ”€โ”€ styles.css
โ”‚
โ”œโ”€โ”€ screenshots/
โ”‚   โ”œโ”€โ”€ dashboard.png
โ”‚   โ”œโ”€โ”€ repository-analysis.png
โ”‚   โ”œโ”€โ”€ ask-ai.png
โ”‚   โ”œโ”€โ”€ code-search.png
โ”‚   โ”œโ”€โ”€ architecture.png
โ”‚   โ””โ”€โ”€ file-tree.png
โ”‚
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md

๐Ÿ”Œ API

The FastAPI backend exposes:

GET  /api/health
POST /api/analyze
POST /api/search
POST /api/ask
POST /api/architecture

Health

GET /api/health

Checks whether Ollama is reachable and reports available models.

Analyze

POST /api/analyze

Clones and indexes a public GitHub repository.

Search

POST /api/search

Searches indexed source files.

Ask

POST /api/ask

Builds relevant code context and asks the local LLM.

Architecture

POST /api/architecture

Generates an architecture explanation using repository context.


๐Ÿง  Why this is a good college project

RepoPilot combines several real engineering concepts in one application:

React
  +
FastAPI
  +
Git
  +
Code indexing
  +
Search
  +
Local LLM
  +
REST APIs
  +
Repository analysis

It is also easy to demonstrate in a viva:

"Give me a GitHub repository and I can locally clone it, inspect it, search its code, analyze project health, and ask an open-source local LLM questions about its architecture."

That's a much better demonstration than a static AI chatbot.


๐Ÿšง Current limitations

This version intentionally supports public GitHub repositories only.

It does not currently:

  • Analyze private repositories
  • Execute project code
  • Build dependency graphs
  • Parse every programming language with a full AST
  • Perform a real security audit
  • Guarantee that the LLM's explanation is correct

The AI is only as reliable as the repository context and local model.


๐Ÿ”ฎ Future ideas

Possible upgrades:

  • ZIP repository upload
  • Private GitHub OAuth
  • GitHub App integration
  • AST-based code analysis
  • Dependency graph visualization
  • Call graph visualization
  • Git commit history analysis
  • Security smell detection
  • Automatic README generation
  • Local embeddings / RAG
  • Multiple Ollama models
  • Export architecture report as PDF
  • Repository comparison
  • Code-quality trends

๐Ÿ‘จโ€๐Ÿ’ป Built by

@harshitethic

Built by @harshitethic

โค๏ธ For his college bhais

Made for students who want to build, understand, customize, and actually explain their projects in the viva.

No fake demo.

No:

"Please enter your OpenAI API key"

Just clone it, run it, understand it, and make it better. ๐Ÿš€


โญ If you found it useful

Star the repository โญ

Fork it ๐Ÿด

Break it ๐Ÿ’€

Fix it ๐Ÿ”ง

And most importantly:

Understand your code before your viva. ๐Ÿ˜ญ


License

MIT License.

About

๐Ÿง  Local AI codebase engineer that analyzes GitHub repos, searches source code, explains architecture, and answers coding questions using Ollama โ€” no paid APIs.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages