Browse, search, and download files from GitHub repos in your terminal.
Project description
Github Scrape Project
โก Browse, search & download files from GitHub repos without cloning
A fast, beautiful TUI for cherry-picking exactly what you need from any repository
๐ Table of Contents
- ๐ Overview
- โจ Features
- ๐๏ธ Architecture
- ๐ Installation
- ๐ Usage
- โจ๏ธ Keyboard Shortcuts
- โ๏ธ Configuration
- ๐ค Contributing
- ๐ License
๐ 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
asyncioand 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 |
Search
| 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file github_scrape_project-0.1.2.tar.gz.
File metadata
- Download URL: github_scrape_project-0.1.2.tar.gz
- Upload date:
- Size: 33.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d69385cd18e326706fa56be4006a6c5037fc741531d7c1228474a07fa7cbc112
|
|
| MD5 |
26553aa66c9fb718fe03bc3131c6aae1
|
|
| BLAKE2b-256 |
08d4012720aed2a08af4a0395d0340f4f70d49e2b45fc36b7ff086ce4bb8f151
|
File details
Details for the file github_scrape_project-0.1.2-py3-none-any.whl.
File metadata
- Download URL: github_scrape_project-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d31f5abd7cfb309c5626bbf480c018593e8c9e2634cab994fe0c0c72bbc332e
|
|
| MD5 |
95c79675e58da74535261d947f386b53
|
|
| BLAKE2b-256 |
348c2fa52fb387c07bf94c0919abd74a5e01b5f910dbecc1ea8285f9442606d9
|