Overview
MangoFetch represents a paradigm shift in terminal-based media acquisition. Engineered with uncompromising standards for memory safety and concurrency, it eschews bloated graphical interfaces in favor of a raw, low-latency execution environment. Built upon the robust foundations of Tokio and Reqwest, the engine is explicitly designed to saturate network throughput and orchestrate massive archival batches seamlessly, completely decoupling asynchronous I/O operations from the main thread.
With the release of v0.5.1, MangoFetch transcends traditional CLI tools by introducing a professional-grade TUI (Terminal User Interface). This interface blends hardcore operational efficiency with striking visual ergonomics, featuring dynamic settings management, fluid mouse event propagation, and a suite of 11 bespoke Tropical Fruit color palettes.
As of v0.5.1, MangoFetch features a professional-grade TUI (Terminal User Interface) with tropical fruit themes, mouse support, and an advanced dynamic settings engine.
๐ ๏ธ 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
โจ Key Features (v0.5.1)
- 1000+ Platforms: Deep, zero-overhead integration with
yt-dlpto support virtually any media portal on the internet. - Interactive TUI: A highly responsive, full-screen dashboard powered by
ratatui, featuring 11 Tropical Fruit Themes (Mango, Pitaya, Guayaba, Passionfruit, and more). - Fluid Mouse Support: Full support for pointer eventsโscroll through sprawling download queues and actuate tabs directly via mouse telemetry.
- Vim-Style Commands: For the ultimate power user, actuate ultra-fast, non-blocking operations via the
:command buffer. - P2P & Torrents: Native protocol implementations for magnet links and peer-to-peer decentralized file sharing.
- Intelligent Extraction Engine: Features multi-segment HTTP downloads, staggered connection starts to bypass rate limits, and zero-copy metadata embedding.
๐๏ธ Technical Architecture
MangoFetch is rigorously organized as a modular workspace, enforcing strict separation of concerns. This architectural decision ensures the core engine remains portable, highly testable, and isolated from the 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)]
Core Components
mangofetch-core: The UI-agnostic heartbeat of the system. It governs the asynchronous download queue, orchestrates connection pooling, and houses the platform-specific native extractors (YouTube, Instagram, TikTok, etc.). It intelligently encapsulatesyt-dlpandffmpegfor complex stream muxing, automatically provisioning these binaries if omitted from the host$PATH.mangofetch-cli: A hyper-lightweight frontend built withclap. It acts as a highly optimized dispatcher consuming the core library, rendering real-time telemetry via a brutalist, information-dense ANSI interface or the interactive TUI.mangofetch-plugin-sdk: A robust FFI-compatible SDK engineered to extend MangoFetch's capabilities dynamically at runtime via shared libraries (.so/.dll).
โ๏ธ The Core Engine Lifecycle
The mangofetch-core queue is intrinsically fault-tolerant. Operating on a resilient asynchronous loop, if a single task in a 10,000-item batch encounters a network anomaly, the queue isolates the failure, initiates exponential backoff retries, and continues processing the matrix without stalling.
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 Milestones
- Asynchronous I/O Pipeline: Built upon
tokio::sync::mpscchannels for non-blocking progress reporting. The UI rendering thread is completely decoupled from the heavy I/O threads, guaranteeing fluid terminal refreshes. - Self-Healing Dependencies: Automatic checksum validation, resolution, downloading, and path-linking of external binaries (
ffmpeg,yt-dlp). - Intelligent Parser Heuristics: The Platform Registry attempts to natively parse media using zero-cost abstractions, falling back to generic extractors only when mathematically necessary.
๐น๏ธ Command Reference
For a comprehensive breakdown of all execution flags, API arguments, and TUI keybindings, please consult our Official Engineering 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 payload extraction and download. |
mangofetch download-multiple <file> |
mango dm <file> |
High-throughput batch archival from a manifest file. |
mangofetch info <url> |
mango i <url> |
Perform media metadata telemetry without touching disk. |
mangofetch list |
mango ls |
Inspect current active queue and historical matrix. |
mangofetch clean |
mango c |
Clear persistent download history and purge cache. |
mangofetch config |
mango cfg |
Manage engine parameters, connection limits, and paths. |
mangofetch check |
mango ch |
Verify cryptographic integrity of system dependencies. |
mangofetch update |
mango up |
Upgrade internal dependency binaries to latest hashes. |
mangofetch logs |
mango log |
Tail raw asynchronous application logs for debugging. |
mangofetch about |
mango a |
Display engine version, license, and telemetry data. |
๐บ๏ธ Roadmap & Milestones
| Version | Status | Milestone |
|---|---|---|
| v0.1.0 | โ | Initial release and asynchronous architecture setup |
| v0.2.0 | โ | Standalone rewrite โ GUI stripped, core engine highly optimized |
| v0.3.1 | โ | Rebranding cleanup, test matrix fixes, and documentation |
| v0.4.0 | โ | The TUI Release: Full-screen interactive terminal interface |
| v0.5.1 | โ | UX & Polish: Tropical themes, pointer support, dynamic UI |
| v0.6.0 | โณ | Plugin management and community extractors via FFI SDK |
| v0.7.0 | โณ | Decentralized P2P swarm integration |
๐ค 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. We adhere to rigorous engineering standards. For major architectural permutations, please open an RFC issue first to discuss your algorithm and approach. See CONTRIBUTING.md for guidelines.