|
|
Fast, Tropical, Pure Rust. |
- Overview
- The mangoSuite
- Cross-Platform Compatibility
- Using as a Rust Library (mangofetch-core)
- TUI Installation & Run
- Technical Architecture
- How the Engine Works
- Command Reference
- Acknowledgments
- Contributing
- License
MangoFetch downloads media quickly across multiple platforms. It provides granular control over video and audio formats without complex configuration.
The mangofetch-core engine uses Tokio and Reqwest to handle YouTube, Torrents, SoundCloud, and Instagram. It wraps yt-dlp and ffmpeg to support over 1000 platforms.
This repository contains:
mangofetch(TUI): The interactive terminal frontend built withratatui. Launches by default and supports mouse interaction, modal dialogs, and multiple color palettes.mangofetch-core: The headless download engine.mangofetch-plugin-sdk: The plugin SDK for extending the engine's capabilities.
MangoFetch has been modularized into separate repositories for maximum flexibility:
- mangofetch (This repo): Core engine SDK and interactive Ratatui TUI.
- mangofetch-cli: Scriptable, pure CLI frontend for headless execution and server batch jobs.
- mangofetch-gui: Hardware-accelerated desktop GUI built with
egui&eframe.
MangoFetch runs natively on multiple architectures and operating systems.
- Operating Systems: Windows (10/11), macOS (Intel and Apple Silicon), GNU/Linux, and BSD.
- Architectures: AMD64, ARM64, and ARMv7. It operates on desktops, MacBooks, and Raspberry Pi.
- Dependency Management: The engine detects missing binaries like
yt-dlp,ffmpeg, oraria2c. It automatically downloads the correct standalone version for your OS.
Integrate mangofetch-core directly into Discord bots, web servers, or custom applications.
Add it to Cargo.toml:
[dependencies]
mangofetch-core = "<version>"Engine Capabilities:
- Simple Telemetry: Track progress via
tokio::sync::mpscchannels. - Unified Traits: Use the
PlatformDownloadertrait for links, torrents, and videos. - Dependency Automation: The engine manages
yt-dlpandffmpegbinaries. - Recovery: The download manager handles retries and network interruptions.
Install the TUI to your system path:
cargo install mangofetchgit clone https://github.com/julesklord/mangofetch.git
cd mangofetch
cargo build --releaseSimply run the binary without any arguments to launch the interactive TUI directly:
mangofetchNote
You can still pass traditional CLI commands to this binary (e.g., mangofetch check, mangofetch info <url>), but executing it empty launches the TUI immediately.
Set MANGOFETCH_OFFLINE=1 to run tests without downloading external tools:
export MANGOFETCH_OFFLINE=1
cargo test -p mangofetch-coreThe modular design separates the core engine from the user interfaces.
graph TD
User([Terminal / App User]) -->|CLI / Events| Frontend(mangofetch TUI)
subgraph MangoFetch Workspace
Frontend -->|Dispatch & Read MPSC| Core(mangofetch-core)
subgraph Core Engine
Core --> Manager[Manager: Queue & Recovery]
Core --> Registry[Platform Registry]
Manager --> IO[Tokio Async I/O]
Registry --> Ext_Native[Native Extractors]
Registry --> Ext_Generic[Generic Extractor]
end
Frontend -.->|Dynamic Linking| SDK(mangofetch-plugin-sdk)
end
Ext_Generic -->|Wraps| YTDLP[yt-dlp Binary]
Ext_Native -->|Muxes Audio/Video| FFmpeg[FFmpeg Binary]
Ext_Native -->|BitTorrent / P2P| RQBit[librqbit]
YTDLP -.-> Network((Internet))
IO -.-> Network
IO --> Disk[(Local Storage)]
mangofetch-core: Manages the download queue and platform extractors. It handles binary dependencies automatically.mangofetch(TUI): The interactive terminal frontend usingratatui.mangofetch-plugin-sdk: A toolkit for extending features at runtime.
The queue processes multiple items concurrently. It isolates failures and triggers automatic retries.
stateDiagram-v2
[*] --> Queued : Submit 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 --> Paused : User Pauses
Paused --> Active : User Resumes
Active --> Seeding : BitTorrent Complete
Seeding --> Complete : Seed Goal Reached
Active --> Complete : Success
Active --> Error : Interruption / Connection Drop
Error --> Queued : Retry Logic Triggered (Auto-Recovery)
Complete --> [*]
- Progress Reporting: Background channels provide updates without blocking the UI.
- Binary Provisioning: Locates and configures
ffmpegandyt-dlp. - Smart Parsing: Prioritizes native extraction over external wrappers.
View the Official Wiki for details.
| Command | Alias | Description |
|---|---|---|
mangofetch download <url> |
mango d |
Download a single link. |
mangofetch download-multiple |
mango dm |
Process links from a file. |
mangofetch info <url> |
mango i |
View metadata without downloading. |
mangofetch list |
mango ls |
View current queue. |
mangofetch clean |
mango c |
Clear history and cache. |
mangofetch config |
mango cfg |
Modify limits and paths. |
mangofetch check |
mango ch |
Verify external tool status. |
mangofetch update |
mango up |
Update external binaries. |
mangofetch logs |
mango log |
View debug logs. |
mangofetch about |
mango a |
Show version and license. |
Submit pull requests for features or fixes. Open an issue first for major changes. See CONTRIBUTING.md for details.
Built by Jules and Claude.
Released under the GPL-3.0 License.