Metadata-Version: 2.4
Name: getit-cli
Version: 0.1.0
Summary: Universal file hosting downloader with TUI - supports GoFile, PixelDrain, MediaFire, 1Fichier, Mega.nz
Project-URL: Homepage, https://github.com/Eltigani-web/getit
Project-URL: Repository, https://github.com/Eltigani-web/getit
Project-URL: Issues, https://github.com/Eltigani-web/getit/issues
Author: getit contributors
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: 1fichier,async,cli,download,file-hosting,gofile,mediafire,mega,pixeldrain,tui
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: aiofiles>=24.1.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: aiolimiter>=1.1.0
Requires-Dist: aiosqlite>=0.20.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: lxml>=5.2.0
Requires-Dist: pycryptodomex>=3.20.0
Requires-Dist: pydantic-settings>=2.3.0
Requires-Dist: pydantic>=2.7.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: rich>=13.7.0
Requires-Dist: tenacity>=8.3.0
Requires-Dist: textual>=0.70.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.2.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Requires-Dist: types-aiofiles>=24.1.0; extra == 'dev'
Description-Content-Type: text/markdown

<h1 align="center">getit</h1>

<p align="center">
  <strong>Universal file hosting downloader with a beautiful Terminal UI</strong>
</p>

<p align="center">
  <a href="https://pypi.org/project/getit-cli/"><img src="https://img.shields.io/pypi/v/getit-cli?color=blue&label=PyPI" alt="PyPI"></a>
  <a href="https://github.com/Eltigani-web/getit/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg" alt="License: GPLv3"></a>
  <a href="https://python.org"><img src="https://img.shields.io/badge/Python-3.10+-blue.svg" alt="Python 3.10+"></a>
  <a href="https://github.com/Eltigani-web/getit/actions"><img src="https://github.com/Eltigani-web/getit/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
</p>

<p align="center">
  Download files from GoFile, PixelDrain, MediaFire, 1Fichier, and Mega.nz with a single command.
</p>

---

## 🌟 Why GetIt?

GetIt transforms the mundane task of downloading files from various hosting services into a seamless, visual experience. Whether you are a casual user wanting a simple download or a power user needing batch processing and encryption support, GetIt handles it all with style.

## ✨ Features

- **Broad Host Support**: Seamlessly download from **GoFile**, **PixelDrain**, **MediaFire**, **1Fichier**, and **Mega.nz**.
- **Stunning TUI**: innovative terminal interface that provides real-time progress visualization, speed metrics, and active management.
- **Robust CLI**: Complete command-line control for scripting and headless operations.
- **Performance First**:
    - **Concurrent Downloads**: Maximize bandwidth by downloading multiple files at once.
    - **Smart Resume**: Automatically resumes interrupted downloads where possible.
    - **Speed Limiting**: strict bandwidth controls for background usage.
- **Advanced Capabilities**:
    - **Recursive Folder Support**: Downloads entire directory structures.
    - **Security**: Handles password-protected links and fully decrypts Mega.nz AES-CTR encryptions.
    - **Integrity**: Auto-verifies MD5/SHA256 checksums to ensure file safety.
- **Cross-Platform**: Runs flawlessly on macOS, Linux, and Windows.

## 🚀 Quick Start

### Installation

Install via pip (recommended):

```bash
pip install getit-cli
```

Or using Homebrew (macOS/Linux):

```bash
brew tap ahmedeltigani/getit
brew install getit
```

### Basic Usage

**Download a single file:**
```bash
getit download https://gofile.io/d/abc123
```

**Launch the interactive TUI:**
```bash
getit tui
```

**Batch download from a file:**
```bash
getit download -f urls.txt
```

## 📖 Comprehensive Guide

### Command Line Interface

The CLI is designed for efficiency.

```bash
getit download <URL> [OPTIONS]
```

**Common Options:**
- `-o, --output DIR`: Specify target directory (default: `./downloads`).
- `-c, --concurrent NUM`: Set max simultaneous downloads (default: 4).
- `-p, --password TEXT`: Provide password for protected resources.
- `-l, --limit SPEED`: Set a speed cap (e.g., `1M`, `500K`).
- `--no-resume`: Force restart of downloads.

### Interactive TUI Controls

Manage your queue effortlessly with keyboard shortcuts:

| Key | Action | Description |
|-----|--------|-------------|
| `a` | Add URL | Input a new URL to download queue |
| `b` | Batch Import | Load multiple URLs from a file |
| `p` | Pause/Resume | Toggle state of selected download |
| `c` | Cancel | Stop and remove selected download |
| `s` | Settings | Configure global preferences |
| `d` | Dark Mode | Toggle visual theme |
| `q` | Quit | Exit the application |

### Host Specifics

| Host | Files | Folders | Password | Encryption | Notes |
|------|:-----:|:-------:|:--------:|:----------:|-------|
| **GoFile** | ✅ | ✅ | ✅ | - | Handles rate limits & guest tokens automatically. |
| **PixelDrain** | ✅ | ✅ | - | - | Supports lists and individual files. |
| **1Fichier** | ✅ | - | ✅ | - | Manages wait times between downloads. |
| **Mega.nz** | ✅ | ✅ | - | ✅ | Features full client-side decryption. |

### Configuration

GetIt looks for `config.json` in:
- **macOS**: `~/Library/Application Support/getit/`
- **Linux**: `~/.config/getit/`
- **Windows**: `%APPDATA%\getit\`

**Example `config.json`:**
```json
{
  "download_dir": "~/Downloads/getit",
  "max_concurrent_downloads": 4,
  "enable_resume": true,
  "gofile_token": "your_token_here"
}
```

## 🛠 Development

We welcome contributions!

1. **Clone**: `git clone https://github.com/ahmedeltigani/getit.git`
2. **Setup**: `pip install -e ".[dev]"`
3. **Test**: `pytest`

### Architecture Overview

- **`core/downloader.py`**: Async engine handling HTTP streams and decryption.
- **`core/manager.py`**: Semaphore-based orchestrator for concurrency.
- **`extractors/`**: Modular logic for each file host.
- **`tui/app.py`**: Textual-based interface implementation.

## 📄 License

This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.

---

<p align="center">
  Made with ❤️ by <a href="https://github.com/ahmedeltigani">Ahmed Eltigani</a>
</p>
