跳到正文
DEV Community· VIBHEESHAN NK·· 3 小時前AI 評分28

RepoGhost AI:以開源 AI 重現被遺忘的程式碼脈絡

👻 RepoGhost AI – Bringing Forgotten Code Back to Life with Open-Source AI

AI 導讀

RepoGhost AI 是一個程式碼庫調查平台,結合 Git 智能、程式碼分析、語意搜尋及開源 AI,協助開發者找回專案中的程式碼與歷史脈絡。平台計劃使用 Gemma、Ollama 和 RAG,透過本機推理回答程式碼庫相關問題;最終模型整合及推理結果會按實際完成情況記錄。

正文

👻 RepoGhost AI – Bringing Forgotten Code Back to Life with Open-Source AI

Hacktoberfest Open-Source AI Challenge: Week 4 – Ghost in the Machine

🚀 What I Built

Introducing RepoGhost AI, an AI-powered codebase investigation platform designed to help developers understand, explore and rediscover the hidden history of their software projects.

Every software repository has a story. Some functions are undocumented, some modules become forgotten, and important development decisions can disappear as projects evolve. Understanding an unfamiliar or older codebase can become a time-consuming challenge.

RepoGhost AI aims to solve this problem by combining Git intelligence, code analysis, semantic search and open-weight AI into one developer-focused platform.

Developers can explore repository structures, investigate commit histories, understand complex source code, discover potentially unused code and generate technical documentation through an intelligent interface.

Inspired by the Hacktoberfest Week 4 theme, Ghost in the Machine, RepoGhost AI brings forgotten parts of software projects back into focus.

💡 Inspiration

The inspiration behind RepoGhost AI comes from a simple observation: software repositories contain more than just source code. They contain the history, decisions, experiments and knowledge of the developers who created them.

When developers leave a project or when a codebase grows over time, valuable knowledge can become difficult to recover.

I wanted to explore whether open-source AI could act as a digital investigator that helps developers uncover this hidden knowledge.

The Ghost in the Machine theme provided the perfect inspiration. Instead of imagining ghosts as supernatural entities, I interpreted them as forgotten functions, abandoned modules, undocumented code and hidden histories inside software repositories.

RepoGhost AI is my attempt to give those forgotten parts of software a voice again.

✨ Key Features

1. Repository Explorer

Explore repository structures, folders, files, programming languages and project statistics through a unified dashboard.

2. Ghost History – Git Intelligence

Investigate Git commit history, contributor activity, file modifications and code evolution to understand how a project has changed over time.

3. Code Intelligence

Analyze source code to identify functions, classes, complexity indicators, duplicate-code candidates and potentially unused code.

4. Ghost Chat – AI Code Assistant

Interact with an AI assistant to ask questions about repositories, explain functions, summarize files and understand project architecture.

5. Project Memory

Build searchable project knowledge using embeddings and retrieval-based techniques to help developers find relevant code and documentation.

6. Documentation Generator

Generate draft README files, architecture descriptions, API documentation and developer onboarding guides.

7. Developer Analytics

Visualize repository activity, programming language distribution, commit trends and project health indicators.

🧠 Open-Source AI Integration

Open-source AI is at the heart of RepoGhost AI.

The project is designed around open-weight models and local inference to explore how developers can use AI while maintaining greater control over their source code and development environment.

Planned AI Model: Google Gemma

Model Runtime: Ollama

AI Architecture: Retrieval-Augmented Generation (RAG)

Vector Database: ChromaDB

Inference Approach: Local inference

The proposed AI workflow combines repository analysis, code chunking, embeddings, semantic retrieval and local model inference.

When a developer asks a question, the application retrieves relevant code and documentation from the selected repository and provides that context to the language model.

This approach aims to generate more relevant, repository-specific explanations instead of relying only on generic programming knowledge.

The open-weight approach also provides flexibility to experiment with different models, customize the inference environment and reduce dependency on proprietary AI services.

Note: The final model integration and inference results will be documented according to the implementation actually completed.

🏗️ Technology Stack

Component Technology
Frontend React + Vite
Language TypeScript
UI Styling Tailwind CSS
Backend Python + FastAPI
Git Analysis GitPython
Code Analysis Python AST / Tree-sitter
AI Model Gemma
AI Runtime Ollama
Embeddings Local embedding model
Vector Database ChromaDB
Metadata Storage SQLite
API Communication REST API

⚙️ How It Works

RepoGhost AI follows a repository intelligence pipeline.

Step 1 – Repository Selection

The developer selects a local Git repository for analysis.

Step 2 – Repository Processing

The backend examines the directory structure, source files, documentation and available Git history.

Step 3 – Code Analysis

The system identifies files, functions, classes, programming languages and other code-related information.

Step 4 – Knowledge Indexing

Relevant source-code sections and documentation are divided into meaningful chunks and converted into vector embeddings.

Step 5 – AI-Powered Retrieval

When a developer asks a question, the application retrieves relevant repository context using semantic search.

Step 6 – Local AI Inference

The retrieved context is supplied to the configured open-weight model through Ollama.

Step 7 – Intelligent Response

The application presents explanations, summaries and relevant source references through the RepoGhost AI interface.

🔓 Why Open Innovation Matters

Open innovation is important because developers should have greater control over the tools they use and the data they work with.

For RepoGhost AI, an open-weight AI approach provides several advantages:

  • Privacy: Local inference can help keep repository source code on the developer's machine.
  • Flexibility: Developers can experiment with different compatible models.
  • Customization: Open-weight models provide opportunities for model adaptation and experimentation.
  • Reduced dependency: The application does not need to depend entirely on proprietary AI APIs.
  • Accessibility: Developers can explore local AI without requiring a paid external inference service, subject to hardware and resource requirements.
  • Community collaboration: Open-source tools allow developers to learn, contribute and improve the ecosystem together.

My goal is to demonstrate how open-source AI can become a practical part of everyday software development.

🖥️ Screenshots and Demo

Live Demo: [https://lumina-puce-ten.vercel.app/]

GitHub Repository: [https://github.com/asusvivobook176-svg/lumina]

Screenshots:

  • RepoGhost AI Dashboard
  • Repository Explorer
  • Ghost History
  • Code Intelligence
  • Ghost Chat
  • Documentation Generator

🛠️ Installation and Usage

Prerequisites

  • Python
  • Node.js and npm
  • Git
  • Ollama (for local AI inference)

Clone the repository

git clone YOUR_REPOSITORY_URL
cd RepoGhost-AI

Frontend setup

cd frontend
npm install
npm run dev

Backend setup

Open another terminal:

cd backend
py -m venv venv

Activate the virtual environment on Windows:

venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

Start the FastAPI server:

uvicorn app.main:app --reload --port 8000

Local AI setup

Install Ollama and download the selected Gemma model according to your system's available resources.

ollama pull gemma3:1b

Start the model:

ollama run gemma3:1b

The selected model and its configuration should match the model used by the application.

🔮 Future Improvements

RepoGhost AI has several opportunities for further development:

  • Multi-language repository intelligence.
  • Advanced code dependency visualization.
  • More accurate unused-code detection.
  • Multi-agent codebase investigation.
  • Improved Git history reasoning.
  • Repository-specific long-term memory.
  • Automated security and code quality analysis.
  • Team collaboration and shared project knowledge.
  • More open-weight model integrations.

🙌 Acknowledgements

I would like to thank the Hacktoberfest team, DEV Community and the open-source AI ecosystem for creating opportunities to explore, experiment and build meaningful projects.

This project is an exploration of how open-source AI can help developers rediscover the knowledge hidden inside their software repositories.


👻 Final Thoughts

Every repository has a history. Every function has a purpose, and every project contains knowledge that deserves to be understood.

With RepoGhost AI, I want to bring that hidden knowledge back to life.

Your Codebase Has a Ghost. Let AI Reveal Its History.

Project: RepoGhost AI

Theme: Hacktoberfest 2026 – Ghost in the Machine

devchallenge #hf26challenge #Hacktoberfest #OpenSource #ArtificialIntelligence #Gemma #Python #React #FastAPI #Ollama #DeveloperTools #RAG

來源:DEV Community · dev.to