π₯ mangofetch
Brutally fast. Extensible. Pure Rust.
A high-performance, asynchronous download engine for the terminal.
Overview
MangoFetch is a highly concurrent, memory-safe media download engine. Built on top of Tokio and Reqwest, it is designed to maximize network throughput and handle massive archival batches without blocking the main thread.
As of v0.5.0, MangoFetch features a professional-grade TUI (Terminal User Interface) with tropical fruit themes, mouse support, and an advanced dynamic settings engine.
β¨ Key Features (v0.5.0)
- 1000+ Platforms: Deep integration with
yt-dlpto support almost every video site. - Interactive TUI: A full-screen dashboard with Tropical Fruit Themes (Mango, Pitaya, Guayaba, and more!).
- Mouse Support: Scroll through queues and click tabs directly in your terminal.
- Vim-Style Commands: Power users can use
:commands for ultra-fast operations. - P2P & Torrents: Native support for magnet links and peer-to-peer file sharing.
- Smart Engine: Multi-segment downloads, staggered starts, and automatic metadata embedding.
ποΈ Technical Architecture
MangoFetch is organized as a modular workspace, ensuring strict separation of concerns. This allows the core engine to be portable and highly testable, while the CLI remains a thin rendering layer.
graph TD
User([Terminal User]) -->|CLI Commands| CLI(mangofetch-cli)
subgraph MangoFetch Workspace
CLI -->|Dispatch & Render| Core(mangofetch-core)
subgraph Core Engine
Core --> Queue[Async Download Queue]
Core --> Registry[Platform Registry]
Queue --> IO[Tokio Async I/O]
Registry --> Ext_Native[Native Extractors]
Registry --> Ext_Generic[Generic Extractor]
end
CLI -.->|Dynamic Linking| SDK(mangofetch-plugin-sdk)
end
Ext_Generic -->|Wraps| YTDLP[yt-dlp Binary]
Ext_Native -->|Muxes Audio/Video| FFmpeg[FFmpeg Binary]
YTDLP -.-> Network((Internet))
IO -.-> Network
IO --> Disk[(Local Storage)]
Components
mangofetch-core: The UI-agnostic engine. It manages the asynchronous download queue, handles connection pooling, and contains the platform-specific extractors (native parsers for YouTube, Instagram, TikTok, etc.). It intelligently wrapsyt-dlpandffmpegfor complex media streams, automatically provisioning these binaries if they are missing.mangofetch-cli: A lightweight frontend built withclap. It acts as a thin dispatcher that consumes the core library, rendering real-time progress via a brutalist, information-dense ANSI interface.mangofetch-plugin-sdk: A robust FFI-compatible SDK designed for extending MangoFetch's capabilities dynamically via shared libraries (.so/.dll).
βοΈ The Core Engine Lifecycle
The mangofetch-core queue is fault-tolerant. If a single item in a 1,000-item batch fails, the queue continues processing, aggregating failures for the final summary.
stateDiagram-v2
[*] --> Queued : User Submits URL
Queued --> FetchingMetadata : Worker Thread Picks Item
FetchingMetadata --> Active : Media Info Resolved
FetchingMetadata --> Error : Network/Parse Failure
state Active {
[*] --> Allocating
Allocating --> Downloading : Progress Stream via MPSC
Downloading --> Muxing : Audio+Video Merge (FFmpeg)
Muxing --> [*]
}
Active --> Complete : Success
Active --> Error : Interruption / Connection Drop
Error --> Queued : Retry Logic Triggered
Complete --> [*]
Key Engineering Features
- Asynchronous I/O Pipeline: Utilizing
tokio::sync::mpscchannels for non-blocking progress reporting. The UI thread is completely decoupled from the I/O threads. - Self-Healing Dependencies: Automatic resolution, downloading, and path-linking of external binaries (
ffmpeg,yt-dlp). The user never has to touch their$PATH. - Intelligent Parsers: The Platform Registry attempts to natively parse media (saving overhead) before falling back to generic extractors.
πΉοΈ Command Reference
For a complete breakdown of all commands, flags, and TUI shortcuts, please visit our Official Wiki.
- π Installation Guide
- π οΈ CLI Command Reference
- π₯οΈ TUI Interactive Guide
- ποΈ Technical Architecture
| Full Command | Short Alias (Upcoming) | Description |
|---|---|---|
mangofetch download <url> |
mango d <url> |
Single file download and extraction. |
mangofetch download-multiple <file> |
mango dm <file> |
Batch archival from a text file (supports concurrency). |
mangofetch info <url> |
mango i <url> |
Inspect media metadata without touching disk. |
mangofetch list |
mango ls |
View current queue and historical download status. |
mangofetch clean |
mango c |
Clear download history and purge cache. |
mangofetch config |
mango cfg |
Manage application settings (connections, paths). |
mangofetch check |
mango ch |
Verify system dependencies (yt-dlp, ffmpeg). |
mangofetch update |
mango up |
Update internal dependency binaries to latest versions. |
mangofetch logs |
mango log |
Tail raw application logs for debugging. |
mangofetch about |
mango a |
Display version, license, and lineage information. |
π οΈ Installation
Via Cargo (Recommended)
The fastest way to install the CLI directly to your system path:
From Source
For developers who want the absolute bleeding edge or wish to modify the core:
# The compiled binary will be available at: target/release/mangofetch
πΊοΈ Roadmap & Milestones
| Version | Status | Milestone |
|---|---|---|
| v0.1.0 | β | Initial release and architecture setup |
| v0.2.0 | β | Standalone rewrite β GUI removed, core refactored |
| v0.3.1 | β | Rebranding cleanup, test fixes, and documentation overhaul |
| v0.4.0 | β | The TUI Release: Full-screen interactive terminal interface |
| v0.5.0 | β | UX & Polish: Tropical themes, mouse support, dynamic settings |
| v0.6.0 | β³ | Plugin management and community extractors via SDK |
| v0.7.0 | β³ | Decentralized P2P file sharing implementation |
π€ Acknowledgments
- OmniGet β The absolute backbone of this project. A huge shoutout to tonhowft for architecting the original extraction logic and queue engine that MangoFetch builds upon.
- yt-dlp β The incredible extraction engine handling the heavy lifting for over a thousand unsupported platforms.
Contributing
Pull requests are fiercely welcomed. For major architectural changes, please open an issue first to discuss your approach. See CONTRIBUTING.md for guidelines.