Skip to main content

Github Scrape Project

PyPI version Python version Tests License

⚡ Browse, search & download files from GitHub repos without cloning

A fast, beautiful TUI for cherry-picking exactly what you need from any repository

Demo


📚 Table of Contents


📌 Overview

Github Scrape Project is a terminal-based file browser that lets you:

  • Browse any public or private GitHub repository interactively
  • Fuzzy search through thousands of files instantly
  • Download only what you need — no more git clone + rm -rf
  • Navigate with a beautiful TUI powered by Textual

💡 Built with Python 3.12+, powered by asyncio and designed for speed


✨ Features

Feature Description
🔍 Fuzzy Search Find files instantly with rapidfuzz matching
📊 File Preview View file contents before downloading
📦 Batch Download Select multiple files & folders, download in parallel
🔐 Private Repo Support Works with your GitHub token
💾 LFS Detection Warns about Git LFS files
🎨 Dual Themes Toggle between emoji 📁 and ASCII [D] icons
📂 Smart Paths Creates directories matching repository structure
⚡ Async I/O Concurrent downloads with semaphore control

🏗️ Architecture

github-scrape-project/
├── src/github_scrape/
│   ├── __init__.py      # Package entry point
│   ├── api.py           # GitHub API client (httpx + asyncio)
│   ├── cli.py           # Typer CLI interface
│   ├── config.py        # User settings (TOML)
│   ├── downloader.py    # Async file downloads
│   ├── tui.py           # Textual TUI screens
│   └── utils.py         # URL parsing & sanitization
├── tests/               # 110+ tests (pytest)
└── .github/workflows/   # CI/CD pipeline

Tech Stack:

Component Technology
CLI typer with Rich formatting
TUI textual reactive framework
HTTP httpx async client
Testing pytest + respx + pytest-asyncio

🚀 Installation

Prerequisites

  • Python 3.12 or higher
  • pip or pipx

Quick Install

# Using pipx (recommended)
pipx install github-scrape-project

# Using pip
pip install github-scrape-project

Development Setup

1️⃣ Clone repository

git clone https://github.com/Vamsiindugu/Github-Scrape.git
cd Github-Scrape

2️⃣ Create virtual environment

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

3️⃣ Install in editable mode

pip install -e ".[dev]"

4️⃣ Run tests

pytest tests/ -v

📖 Usage

🎬 Interactive Mode

Launch the TUI with no arguments:

github-scrape

Then:

1️⃣ Enter a URL or shorthand (owner/repo)

2️⃣ Press Tab to auto-fill https://github.com/

3️⃣ Browse with arrow keys, toggle selection with Space

4️⃣ Press d to download

⚡ Direct Mode

# Browse specific repo
github-scrape https://github.com/python/cpython

# Use shorthand
github-scrape python/cpython

# With options
github-scrape python/cpython --token YOUR_TOKEN --cwd --no-folder

🔧 Command Reference

Command Description
github-scrape Launch interactive TUI
github-scrape <url> Browse specific repository
github-scrape config set token <TOKEN> Save GitHub token
github-scrape config set path <PATH> Set download directory
github-scrape config list Show current settings
github-scrape config unset token Remove saved token

⌨️ Keyboard Shortcuts

Navigation

Key Action
↑/↓ or j/k Move cursor up/down
Enter or l Open folder / file
h or Backspace Go to parent folder
g / Home Jump to first item
G / End Jump to last item

Selection

Key Action
Space Toggle file selection
a Select all visible files
u Unselect all
Key Action
/ Focus search bar
Escape Clear search / exit search
Ctrl+U Clear search input

Actions

Key Action
d Download selected files
i Toggle emoji ↔ ASCII icons
o Open download folder
q Quit
Ctrl+C Force quit

⚙️ Configuration

Config File Location

OS Path
Linux/macOS ~/.config/github-scrape-project/config.toml
Windows %APPDATA%\github-scrape-project\config.toml

Available Settings

[github]
token = "ghp_xxxxxxxxxxxxxxxxxxxx"

[download]
default_path = "/home/user/Downloads/github-scrape-project"

Getting a GitHub Token

1️⃣ Go to Settings → Developer settings → Personal access tokens

2️⃣ Generate a new token with repo scope

3️⃣ Save it: github-scrape config set token YOUR_TOKEN


🤝 Contributing

Contributions are welcome! Please follow these steps:

1️⃣ Fork the repository

2️⃣ Clone your fork: git clone https://github.com/YOUR_USERNAME/Github-Scrape.git

3️⃣ Create a feature branch: git checkout -b feature/amazing-feature

4️⃣ Make your changes

5️⃣ Run quality checks:

# Linting
ruff check src/github_scrape tests/

# Type checking
mypy src/github_scrape

# Tests
pytest tests/ -v

6️⃣ Commit with clear messages: git commit -m "feat: add amazing feature"

7️⃣ Push to your fork: git push origin feature/amazing-feature

8️⃣ Open a Pull Request

Development Guidelines

Quality Gate Command Required
Linting ruff check . ✅
Type checking mypy src/github_scrape ✅
Tests pytest tests/ ✅
Coverage >80% ✅

📊 Testing

# Run all tests
pytest tests/ -v

# Run with coverage
pytest tests/ --cov=github_scrape --cov-report=html

# Run specific test file
pytest tests/test_tui.py -v

Current Coverage: 110+ tests passing, 8 TUI integration tests skipped.


🙏 Acknowledgments

  • Textual — The incredible TUI framework
  • Typer — Beautiful CLI interfaces
  • Rich — Terminal formatting
  • ghgrab — Original inspiration

📄 License

Distributed under the MIT License. See LICENSE for details.


Crafted with 💙 by Vamsi Indugu

Metadata

Release files for github-scrape-project 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for github-scrape-project 0.2.0
File Size Uploaded Provenance Actions
github_scrape_project-0.2.0.tar.gz 19.8 kB Without provenance Details for github_scrape_project-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for github-scrape-project 0.2.0
File Interpreter ABI Platform Actions
github_scrape_project-0.2.0-py3-none-any.whl Python 3 none any Details for github_scrape_project-0.2.0-py3-none-any.whl

Total release size: 43.1 kB

Release files / github_scrape_project-0.2.0.tar.gz

Download URL github_scrape_project-0.2.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cba58656b601e032287470eabc2c1ee779858a2dcd377d6bab4a7a6d9b5c4ef7
BLAKE2b-256 checksum
How to use checksums
e600649a4afdbf449f4be90ced98e31b6e949a2ae353f0beff9994373bdb524d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / github_scrape_project-0.2.0-py3-none-any.whl

Download URL github_scrape_project-0.2.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ebbe4d5cb046ebbe270e157988ba58d5841de442107629c42611cc2893978dd
BLAKE2b-256 checksum
How to use checksums
d8ad84a454599db3cce45ffb24dd8dbe8df24368156b4212b3f432716a1ea3c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for github-scrape-project 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page