AI-powered GitHub repository analyzer that generates a polished README.md using LLMs.
The project includes:
- A FastAPI backend for repository scanning, summarization, and README generation
- A dark, glass-style frontend with real-time scan logs and GitHub-style markdown preview
Agentic-ai-application/
├── backend/
│ ├── app/
│ │ ├── api/routes.py
│ │ ├── services/scraper.py
│ │ ├── services/summarizer.py
│ │ ├── services/readme_generator.py
│ │ ├── config.py
│ │ └── main.py
│ ├── run.py
│ ├── requirements.txt
│ └── .env.example
├── frontend/
│ ├── index.html
│ ├── styles.css
│ └── app.js
└── archived/
- Generate README from a GitHub repository URL
- Live progress stream (
scanning file...) in the UI - GitHub-style rendered markdown preview (not raw markdown syntax view)
- Multi-provider LLM support: OpenRouter or Hugging Face
- Cost-aware token budgeting and aggressive file filtering
- Ignores irrelevant files (including common data/model artifact folders)
cd backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
pip install -r requirements.txtCreate .env from template:
copy .env.example .env # Windows
# cp .env.example .env # macOS/LinuxSet at least:
GITHUB_TOKEN=your_github_token
OPENROUTER_API_KEY=your_openrouter_key
# OR HF_TOKEN=your_huggingface_tokenRun backend:
python run.pyBackend URL: http://127.0.0.1:8000
cd frontend
python -m http.server 5500Frontend URL: http://127.0.0.1:5500
For local development, the frontend reads its API base URL from frontend/config.js.
GET /api/healthPOST /api/generate-readme(standard JSON response)POST /api/generate-readme-stream(NDJSON stream for live logs)
{
"repo_url": "https://github.com/owner/repo",
"use_hf_model": true
}statusscanprogressresultdoneerror
To reduce cost and avoid irrelevant context, the backend:
- Includes only high-signal source/config files
- Skips common noisy directories (
tests,docs,examples, etc.) - Skips data/model directories (
data,datasets,artifacts,checkpoints,weights) - Skips data/model files (
.csv,.parquet,.npy,.pt,.onnx,.safetensors, etc.) - Enforces prompt/token budgets for both summarization and final README generation
Tune these in backend/.env:
MAX_FILES_TO_SUMMARIZEMAX_FILE_CONTENT_CHARSSUMMARIZER_MAX_OUTPUT_TOKENSREADME_MAX_SUMMARY_CHARSREADME_MAX_OUTPUT_TOKENS
GITHUB_TOKEN not set in environment- Ensure
backend/.envexists and hasGITHUB_TOKEN
- Ensure
API key not configured- Set
HF_TOKENinbackend/.env(default path) - Optional fallback: set
OPENROUTER_API_KEYand senduse_hf_model: false
- Set
402from OpenRouter (credits/token budget)- Lower token/file limits in
backend/.env - Or switch to Hugging Face model in UI
- Lower token/file limits in
- Frontend is static and can be deployed on GitHub Pages
- Backend should be deployed separately on Render (or similar)
- Update
frontend/config.jssoAPI_BASE_URLpoints to your deployed backend URL - If you use GitHub Pages, the frontend must call the Render URL over HTTPS
- A GitHub Actions workflow is included at
.github/workflows/deploy-pages.yml
MIT