Skip to main content

๐Ÿ“ฆ Repo Scrapper API & AI CLI

PyPI Version Build & Deploy Status Kubernetes Azure ACR FastAPI IaC Terraform License: MIT

An automated, AI-powered GitHub repository search and scraping platform. Features a Grok AI-driven FastAPI backend deployed on Azure Kubernetes Service (AKS) via Terraform & GitHub Actions CI/CD, alongside an interactive PyPI CLI tool (repo-scrapper-cli).


๐Ÿ›๏ธ End-to-End System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        PyPI Package Client                             โ”‚
โ”‚                    pip install repo-scrapper-cli                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚                                      โ”‚
        [ Primary Hybrid Route ]                [ Offline Fallback Route ]
        FastAPI Backend (AKS)                   Direct GitHub REST API
                  โ”‚                                      โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ Grok AI Dual-Key Rotator  โ”‚            โ”‚   Rule-Based Engine    โ”‚
    โ”‚ (Key 1 โž” Key 2 Failover)  โ”‚            โ”‚   Regex Extractor      โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚                                       โ”‚
                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
                                     โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   GitHub Search REST API โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ป 1. For End Users: CLI Quickstart (PyPI)

If you just want to use the tool to find repositories, you don't need to download the source code โ€” just install it via pip.

Install the CLI tool:

pip install repo-scrapper-cli

Run a search query:

repo-scrapper "top 3 python microservices with docker" --limit 3

Connect to a custom backend URL:

repo-scrapper "react templates" --url "http://your-aks-cluster-ip:8000"

๐Ÿ› ๏ธ 2. For Developers: Local Backend Setup

If you want to run the AI-powered FastAPI backend locally, follow these steps.

Step 1: Clone the repository

git clone https://github.com/Haidar-Karamat/Repo_Scrapper.git
cd Repo_Scrapper

Step 2: Set up a virtual environment

# Windows
python -m venv venv
.\venv\Scripts\Activate.ps1

# Linux / Mac
python3 -m venv venv
source venv/bin/activate

Step 3: Install dependencies

cd server
pip install -r requirements.txt

Step 4: Configure environment variables

Create a .env file inside the server/ directory:

# Grok AI API Keys (Optional, fallback works without it)
GROK_API_KEY_1=your_first_key_here
GROK_API_KEY_2=your_second_key_here

# GitHub Token (Increases rate limit to 5000 req/hr)
GITHUB_TOKEN=ghp_your_github_token_here

Step 5: Run the FastAPI server

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

API documentation will be available at: http://localhost:8000/docs


๐Ÿณ 3. For DevOps: Docker Deployment

To run the backend isolated in a container:

# Build the Docker image
docker build -t repo-scrapper-backend ./server

# Run the container (make sure your .env file is ready)
docker run -d -p 8000:8000 --name repo-backend --env-file ./server/.env repo-scrapper-backend

โ˜๏ธ 4. Cloud Deployment (Terraform & Azure AKS)

Step 1: Authenticate with Azure

az login

Step 2: Provision infrastructure with Terraform

cd terraform
terraform init
terraform plan
terraform apply -auto-approve

Step 3: Deploy to Kubernetes

az aks get-credentials --resource-group repo-scrapper-rg --name repo-scrapper-aks
kubectl apply -f k8s/

๐Ÿ“„ License

This project is licensed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_scrapper_cli-1.3.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_scrapper_cli-1.3.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file repo_scrapper_cli-1.3.0.tar.gz.

File metadata

  • Download URL: repo_scrapper_cli-1.3.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.7

File hashes

Hashes for repo_scrapper_cli-1.3.0.tar.gz
Algorithm Hash digest
SHA256 dd017923591b6f0a117ca34cc6dcfaf717b2c067a883d6d0794f903932730e96
MD5 c73e53d4aadc6841e413c46b714a7b1e
BLAKE2b-256 442acc7910c2bc8215bb96d0f8b9c4fa4351aa4d8fc719e845fcf218affed63b

See more details on using hashes here.

File details

Details for the file repo_scrapper_cli-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for repo_scrapper_cli-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9da39e2491370bbd1234e91332166be91c9e3578d4e57c210a6e1a69e6744aac
MD5 7a8c92824118761a4a69ce686e1a4ecb
BLAKE2b-256 01d27572829956f6309747ee246699cee9134b7d9627066dc14c7b9bd948a788

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

This release

1.3.0 This release

2 files

1.2.1

2 files

1.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page