Skip to content

kks0488/repofit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RepoFit

AI-powered GitHub Trending analyzer that learns your projects, recommends repos that fit your stack, and generates monetization ideas.

Features

Core Features

  • Trending Scraper: GitHub Trending (daily/weekly/monthly) with language filters
  • GitHub Enrichment: Topics, issues, license, and activity via GitHub API
  • AI Scoring & Summaries: Gemini analysis with heuristic fallback when AI is disabled
  • Project Profiles: Register projects with stack, tags, and goals
  • Smart Matching: Two-stage matcher (pgvector similarity + stack overlap + quality)
  • GitHub Search Discovery: Find repos beyond trending using project-based queries
  • Snapshots & History: Save runs and track trending history over time

Project Auto-Discovery (New!)

  • GitHub Sync: Sync your GitHub repos as projects automatically (gt github-sync)
  • Folder Scanner: Scan local projects folder for auto-registration (gt scan-projects)
  • Stack Detection: Auto-detect tech stack from package.json, pyproject.toml, README.md

Notifications & Slack Bot

  • Slack Integration: Rich Korean notifications for all features
  • Daily Digest: Trending + project matching summary
  • Project Matches: "This trending repo fits your project X"
  • RAG-powered Bot: AI answers using stored repo data (langchain + Gemini)
  • Slack Commands: μŠ€μΊ”, μΆ”μ²œ, νŠΈλ Œλ”© in channel β†’ results as new message

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        RepoFit                               β”‚
β”‚                          β”‚                                   β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚    β”‚                     β–Ό                     β”‚            β”‚
β”‚    β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚            β”‚
β”‚    β”‚   β”‚Collector β”‚β†’ β”‚ Enricher β”‚β†’ β”‚Analyzerβ”‚ β”‚  Python    β”‚
β”‚    β”‚   β”‚(scraper) β”‚  β”‚(GH API)  β”‚  β”‚(Gemini)β”‚ β”‚  Backend   β”‚
β”‚    β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚            β”‚
β”‚    β”‚         β”‚              β”‚           β”‚     β”‚            β”‚
β”‚    β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚            β”‚
β”‚    β”‚                     β”‚                     β”‚            β”‚
β”‚    β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚            β”‚
β”‚    β”‚              β”‚   Embedder   β”‚             β”‚            β”‚
β”‚    β”‚              β”‚  (Gemini)    β”‚             β”‚            β”‚
β”‚    β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚            β”‚
β”‚    β”‚                     β”‚                     β”‚            β”‚
β”‚    β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚            β”‚
β”‚    β”‚              β”‚   Matcher    β”‚             β”‚            β”‚
β”‚    β”‚              β”‚  (2-stage)   β”‚             β”‚            β”‚
β”‚    β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚            β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚                          β”‚                                   β”‚
β”‚                          β–Ό                                   β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚    β”‚           Supabase (PostgreSQL)          β”‚              β”‚
β”‚    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚              β”‚
β”‚    β”‚  β”‚gt_repos β”‚ β”‚gt_projs β”‚ β”‚ pgvector  β”‚  β”‚              β”‚
β”‚    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚              β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”‚                          β”‚                                   β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      β”‚
β”‚              β–Ό                       β–Ό                      β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚    β”‚  Next.js Web UI β”‚    β”‚  Slack Notifier β”‚              β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

5-Minute Quickstart

cp .env.example .env
python -m venv .venv && source .venv/bin/activate
pip install -e .

gt init
gt quickstart

# Register your project
gt project-add --name "MyApp" --stack "python,fastapi" --tags "api,web"

# Or sync from GitHub
gt github-sync

# Get daily recommendations
gt sync --notify

CLI Commands

Core Commands

Command Description
gt init Create env files and validate Supabase schema
gt setup Validate configuration and show setup hints
gt quickstart Seed trending data and recommendations quickly
gt trending View trending repos
gt trending --analyze With AI analysis
gt inspect owner/repo Detailed repo analysis
gt history owner/repo Trending history for a repo
gt snapshots List saved trending snapshots

Project Management

Command Description
gt projects List your projects
gt project-add Register a project
gt github-sync Sync your GitHub repos as projects
gt github-sync --starred Also show starred repos
gt scan-projects ~/projects Scan local folder for projects
gt match Find matching repos for all projects
gt match --project <id> Match a single project
gt recommendations View AI recommendations
gt discover Discover GitHub repos that fit your projects

Automation

Command Description
gt sync Full pipeline (fetch β†’ analyze β†’ save β†’ match)
gt sync --notify Full pipeline with daily digest to Slack
gt schedule Run daily sync at a fixed local time (default 19:00)
gt bot Start Slack auto-reply bot (requires Socket Mode)

Smart Matching

The recommendation engine uses a 2-stage approach across all stored repositories:

  1. Stage 1 - Fast Filter:

    • Tech stack overlap (languages, frameworks)
    • Keyword matching (tags, topics)
    • Quality threshold (stars, activity)
  2. Stage 2 - Semantic Rerank:

    • Vector similarity using Gemini embeddings
    • Cosine distance between project ↔ repo embeddings

Scoring Formula:

score = 0.5 Γ— embedding_similarity
      + 0.3 Γ— stack_overlap
      + 0.2 Γ— quality_score

Slack Notifications

Setup

  1. Create Slack App with Bot Token:

    • Go to Slack API β†’ Create New App
    • Add Bot Token Scopes: chat:write, channels:read, channels:history
    • Install to Workspace β†’ Copy Bot Token (xoxb-...)
    • Invite bot to your channel: /invite @YourBot
  2. Enable Socket Mode (for auto-reply bot):

    • Slack App Settings β†’ Socket Mode β†’ Enable
    • Create App-Level Token with connections:write scope
    • Copy the token (xapp-...)
    • Event Subscriptions β†’ Enable Events
    • Subscribe to bot events: message.channels, app_mention
  3. Configure environment:

    SLACK_BOT_TOKEN=xoxb-your-bot-token
    SLACK_APP_TOKEN=xapp-your-app-token  # Socket Mode용
    SLACK_CHANNEL_ID=C0A1CVD5153
    SLACK_NOTIFY_THRESHOLD=0.7

Slack Bot (RAG-powered)

RepoFit 봇은 langchain + Gemini + pgvectorλ₯Ό μ‚¬μš©ν•˜μ—¬ μ €μž₯된 레포 데이터λ₯Ό κ²€μƒ‰ν•˜κ³  더 μ •ν™•ν•œ 닡변을 μ œκ³΅ν•©λ‹ˆλ‹€.

gt bot  # 봇 μ‹œμž‘ (λ°±κ·ΈλΌμš΄λ“œλ‘œ μ‹€ν–‰ ꢌμž₯)

채널 λͺ…λ Ήμ–΄ (μƒˆ λ©”μ‹œμ§€λ‘œ κ²°κ³Ό 전솑):

채널/μŠ€λ ˆλ“œμ— μž…λ ₯ λ™μž‘
μŠ€μΊ” / scan ν”„λ‘œμ νŠΈ 폴더 μŠ€μΊ” β†’ 등둝 β†’ λ§€μΉ­
μΆ”μ²œ / recommend μΆ”μ²œ κ²°κ³Ό β†’ 채널에 μƒˆ λ©”μ‹œμ§€
νŠΈλ Œλ”© / trending νŠΈλ Œλ”© TOP 10 β†’ 채널에 μƒˆ λ©”μ‹œμ§€
λ§€μΉ­ / match λ§€μΉ­ μ‹€ν–‰ β†’ κ²°κ³Ό 채널에

일반 질문 (RAG 응닡):

[Slack μŠ€λ ˆλ“œ]
β”œβ”€ πŸ€– RepoFit: πŸ“Š 였늘의 λ‹€μ΄μ œμŠ€νŠΈ...
β”œβ”€ πŸ‘€ λ‚˜: "fastapiλž‘ langchain μ‘°ν•©ν•˜λ©΄ 뭐 λ§Œλ“€ 수 μžˆμ–΄?"
└─ πŸ€– RepoFit: (μ €μž₯된 레포 정보 검색 ν›„ ꡬ체적 λ‹΅λ³€)

Sample Daily Digest

πŸ“Š 였늘의 RepoFit λ‹€μ΄μ œμŠ€νŠΈ
🌐 Python β€’ πŸ“ˆ νŠΈλ Œλ”© 25개 뢄석
────────────────────────────
🎯 ν”„λ‘œμ νŠΈλ³„ λ§€μΉ­ κ²°κ³Ό
  MyApp: 5개 λ§€μΉ­ β€’ πŸ”₯ 졜고점 92% (owner/repo)
  Backend: 3개 λ§€μΉ­ β€’ ⭐ 졜고점 85% (author/lib)
────────────────────────────
πŸ† 였늘의 TOP μΆ”μ²œ
  πŸ”₯ fastapi/fastapi β†’ MyApp 92% λ§€μΉ­
  ⭐ langchain/langchain β†’ Backend 85% λ§€μΉ­
────────────────────────────
πŸš€ λ‹€μŒ 단계
  β€’ gt recommendations - 전체 μΆ”μ²œ 보기

Daily Notifications

# One-off run (send Slack summary + high-score matches)
gt sync --notify

# Daily schedule at 19:00 local time (keep process running)
gt schedule --hour 19 --minute 0 --notify

Environment Variables

# Backend (.env)
SUPABASE_URL=your-supabase-url
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_KEY=your-service-key
GEMINI_API_KEY=your-gemini-key
GEMINI_MODEL=gemini-2.5-flash
GITHUB_TOKEN=your-github-token  # For github-sync

# Slack Bot (optional but recommended)
SLACK_BOT_TOKEN=xoxb-xxx
SLACK_APP_TOKEN=xapp-xxx  # Socket Mode
SLACK_CHANNEL_ID=Cxxx
SLACK_NOTIFY_THRESHOLD=0.7

# Frontend (web/.env.local)
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key

Daily Automation

systemd (recommended)

mkdir -p ~/.config/systemd/user
cp scripts/repofit-daily.{service,timer} ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now repofit-daily.timer

To change the time, edit ~/.config/systemd/user/repofit-daily.timer and update OnCalendar=.

Cron Job

# Every day at 7 PM - full digest
0 19 * * * cd /path/to/repofit && .venv/bin/gt sync --notify

# Every day at 6 PM - run matching
0 18 * * * cd /path/to/repofit && .venv/bin/gt match --notify

GitHub Actions

Use .github/workflows/daily-sync.yml with secrets:

  • SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_KEY
  • GEMINI_API_KEY
  • SLACK_BOT_TOKEN, SLACK_CHANNEL_ID

Tech Stack

Component Technology
CLI Python, Typer, Rich
AI Google Gemini (analysis + embeddings)
AI SDK google-genai, langchain, langchain-google-genai
RAG langchain + pgvector retrieval
Database Supabase (PostgreSQL + pgvector)
Frontend Next.js 16, React 19, Tailwind CSS 4
HTTP httpx (async)
Notifications Slack Block Kit, slack-bolt (Socket Mode)

Troubleshooting

  • Schema missing: Run schema.sql in Supabase SQL Editor
  • No recommendations: Set GEMINI_API_KEY, then run gt quickstart
  • Slack not working: Check SLACK_BOT_TOKEN and SLACK_CHANNEL_ID
  • No project matches: Register projects with gt project-add first
  • GitHub sync fails: Check GITHUB_TOKEN permissions (repo scope)

License

MIT

About

🎯 AI-powered GitHub trending analyzer. Finds repos matching your stack and goals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published