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.3.tar.gz (10.6 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.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repo_scrapper_cli-1.3.3.tar.gz
  • Upload date:
  • Size: 10.6 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.3.tar.gz
Algorithm Hash digest
SHA256 1c48336867bc1438fcb11cca82cb4930c00e730323be27274e20079c6fc077d5
MD5 0f10c48aea2a8e8b69f6c15cee7ab17b
BLAKE2b-256 dedaa829978506e2826bdb6aeb05c0c94af943bbc16e640071f80f7b6d7cb86d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for repo_scrapper_cli-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b54b27f8c45bd7e5c7e03fcdfce4f6f7e2d06fd1817af8b4884896f44a19fc93
MD5 e7846a0374d11935c04353e30b710c27
BLAKE2b-256 993b4f56ab2ef8fcf801039552cba981b7686d6045d499fb58b3b3f1fb8560bd

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.5

2 files

1.3.4

2 files

This release

1.3.3 This release

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

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