Skip to content

AditthyaSS/Flux

Repository files navigation

Typing SVG

MIT License Python 3.10+ Textual TUI

Next-generation download manager with a stunning terminal interface that adapts to network conditions in real-time.

FeaturesQuick StartArchitectureControls

┌──────────────────────────────────────────────────────────────────────────────┐
│  ███████╗██╗     ██╗   ██╗██╗  ██╗                                           │
│  ██╔════╝██║     ██║   ██║╚██╗██╔╝          Network Health: ●●●●● (Good)    │
│  █████╗  ██║     ██║   ██║ ╚███╔╝           RTT: 45ms | Loss: 0.0%          │
│  ██╔══╝  ██║     ██║   ██║ ██╔██╗                                           │
│  ██║     ███████╗╚██████╔╝██╔╝ ██╗          Made by Aditthya S S • Open    │
│  ╚═╝     ╚══════╝ ╚═════╝ ╚═╝  ╚═╝          Source • Free Forever           │
├──────────────────────────────────┬───────────────────────────────────────────┤
│ 📋 Activity Log                  │ 📊 Network Activity                       │
│ ─────────────────────            │ ─────────────────────                     │
│ ✓ Flux started                   │ ▼ 12.46 MB/s                              │
│ ✓ Added: ubuntu-22.04.iso        │   ████████████████▇▆▅▄▃▂▁                 │
│ ⚡ Downloading at 12.46 MB/s     │ Peak: 15.2 MB/s | Total: 1.2 GB          │
│ ✓ Completed: setup.exe           │                                           │
├──────────────────────────────────┼───────────────────────────────────────────┤
│ 📁 Downloads                     │ 📄 File Details                           │
│ ─────────────────────            │ ─────────────────────                     │
│ Queued (2)  Active (1)  Done (5) │ ▸ ubuntu-22.04.iso                        │
│                                  │ ━━━━━━━━━━━━━━━░░░░░ 75.3%               │
│ ▸ ● ubuntu-22.04.iso             │ 3.2 GB / 4.2 GB                           │
│     Downloading • 75% • 12 MB/s  │ Speed: 12.46 MB/s | ETA: 1m 23s          │
├──────────────────────────────────┴───────────────────────────────────────────┤
│  [A]dd  [S]tart  [P]ause  [R]esume  [O]Auto  [←→]Tabs  [↑↓]Select  [Q]uit   │
└──────────────────────────────────────────────────────────────────────────────┘

✨ Features

🎯 Adaptive Intelligence

Automatically adjusts chunk size and connection count based on real-time network conditions.

📊 Live Dashboard

Full-screen terminal UI with live metrics, network graphs, and professional visualizations.

🧠 Explainable Decisions

See exactly why Flux changes its download strategy in real-time.

⚡ Multi-Connection Downloads

Parallel chunk downloading for maximum throughput - up to 500+ MB/s.

💾 Resume Support

Seamlessly resume interrupted downloads with intelligent chunk tracking.

📈 Network Health Monitor

Real-time network quality indicator with RTT and packet loss metrics.


🚀 Quick Start

Installation

# From PyPI

Open Cmd
Check your current python --version

🛠️ Quick Install
pip install flux-download

🔍 Check version
python -m flux.cli --version

🖥️ Launch Flux (Dashboard)
python -m flux.app

➕ Add a real download (inside Flux)
 Press:a

Paste:
Paste some link which you wanted to download

Press Enter
⏯️ Pause / Resume: p

❌ Quit
q

🧹 Uninstall
pip uninstall flux-download

# Or clone and install
git clone https://github.com/aditthyass/flux.git
cd flux
pip install -e .

Launch the Dashboard

python -m flux.app

Press a to add a download and watch Flux work its magic! ✨

CLI Mode (Headless)

flux-cli download https://example.com/file.zip --output ~/Downloads

⌨️ Keyboard Controls

🎮 Download Management 🧭 Navigation
Key Action
A Add new download
S Start queued download
P Pause active download
R Resume paused download
D Delete from list
Shift+D Delete + remove files
O Toggle auto-start
Key Action
↑↓ Navigate downloads
←→ Switch tabs
Tab Next section
1-4 Jump to section
Q Quit Flux

🏗️ Architecture

╔═══════════════════════════════════════════════════════════════════════════╗
║                           🖥️  FLUX TUI LAYER                              ║
║  ┌─────────────┐  ┌──────────────┐  ┌─────────────┐  ┌────────────────┐  ║
║  │ Activity    │  │  Network     │  │  Downloads  │  │ File Details   │  ║
║  │ Log         │  │  Graph       │  │  List       │  │ Panel          │  ║
║  └─────────────┘  └──────────────┘  └─────────────┘  └────────────────┘  ║
╠═══════════════════════════════════════════════════════════════════════════╣
║                        ⚙️  ADAPTIVE ENGINE CORE                           ║
║  ┌──────────────────┐  ┌────────────────┐  ┌─────────────────────────┐   ║
║  │ 🧠 Decision      │  │ 📊 Metrics     │  │ 📋 Task Queue           │   ║
║  │    Engine        │  │    Tracker     │  │    Manager              │   ║
║  │                  │  │                │  │                         │   ║
║  │ • Smart Chunking │  │ • RTT Tracking │  │ • Priority Scheduling   │   ║
║  │ • Connection     │  │ • Speed Stats  │  │ • Auto-Start Logic      │   ║
║  │   Scaling        │  │ • Efficiency   │  │ • Resume Support        │   ║
║  └──────────────────┘  └────────────────┘  └─────────────────────────┘   ║
╠═══════════════════════════════════════════════════════════════════════════╣
║                          🌐 I/O LAYER                                     ║
║         ┌─────────────────────┐       ┌─────────────────────┐             ║
║         │ 🔌 HTTP Client      │       │ 💾 File Writer      │             ║
║         │   • Range Requests  │       │   • Async I/O       │             ║
║         │   • RTT Measurement │       │   • Chunk Mapping   │             ║
║         │   • Auto Retry      │       │   • State Persist   │             ║
║         └─────────────────────┘       └─────────────────────┘             ║
╚═══════════════════════════════════════════════════════════════════════════╝

🧠 How Flux Thinks

📦 Chunk Size Optimization

Condition Action
Stable throughput + High RTT ⬆️ Increase chunk size
Unstable throughput + Low RTT ⬇️ Decrease chunk size

🔗 Connection Scaling

Condition Action
Low error rate + Server OK ⬆️ More connections
High error rate ⬇️ Fewer connections

💡 Every decision is logged in real-time with full explanations!


🛠️ Development

# Clone the repository
git clone https://github.com/aditthyass/flux.git
cd flux

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest flux/tests/ -v --cov=flux

# Code formatting
black flux/ && isort flux/ && mypy flux/

📦 Building

python build/build.py
Platform Output
Windows dist/flux.exe
Linux dist/flux
macOS dist/flux

🌟 Why Flux?

🔍 Explainability - Understand why your download is fast or slow
🎨 Beautiful TUI - htop-style design with Surge-inspired aesthetics
Modern Architecture - Async Python with real-time adaptive intelligence
🧠 Smart Decisions - Every optimization is logged and explained

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


📄 License

MIT License - see LICENSE for details.


💜 Developed by Aditthya S S

🌟 Open Source • Free Forever 🌟

Built with ❤️ using TextualaiohttpRich

⭐ Star this repo if you find it useful!

About

Flux is a terminal-based, adaptive file transfer engine with real-time observability and explainable optimization.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors