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.5.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.5-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repo_scrapper_cli-1.3.5.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.5.tar.gz
Algorithm Hash digest
SHA256 2f6731aca8e79e401e8bfcb3f13094d068926241d1d6271b1b3728927c0ff2ec
MD5 fa190465b525b42ab41e47fc398efbe7
BLAKE2b-256 f18d1af4037002fcd873ff1b60e103a7b3efbc4114b397ede6506044c5a9841d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for repo_scrapper_cli-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1cf2f4ce5adb710949fe4f18c8c866a6971e21d3057429147cc3a51695f65629
MD5 5573fdea01544b55e204237f441048e3
BLAKE2b-256 abab9818035efca2d303dab5fb0588abb382d06eb52306e3fed203aaa4f32a47

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.5 This release

2 files

1.3.4

2 files

1.3.3

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