idm-cli 1.3.0__tar.gz → 1.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. idm_cli-1.3.3/MANIFEST.in +1 -0
  2. idm_cli-1.3.0/README.md → idm_cli-1.3.3/PKG-INFO +167 -194
  3. idm_cli-1.3.3/README.md +137 -0
  4. idm_cli-1.3.3/idm_cli/__init__.py +3 -0
  5. idm_cli-1.3.3/idm_cli/config.py +156 -0
  6. idm_cli-1.3.3/idm_cli/downloader/core.py +365 -0
  7. idm_cli-1.3.3/idm_cli/downloader/downloader.py +445 -0
  8. idm_cli-1.3.3/idm_cli/downloader/handlers.py +230 -0
  9. idm_cli-1.3.3/idm_cli/downloader/muxer.py +254 -0
  10. idm_cli-1.3.3/idm_cli/downloader/state.py +125 -0
  11. idm_cli-1.3.3/idm_cli/extractors/__init__.py +23 -0
  12. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli/extractors/direct.py +14 -3
  13. idm_cli-1.3.3/idm_cli/extractors/winget.py +107 -0
  14. idm_cli-1.3.3/idm_cli/extractors/ytdlp.py +150 -0
  15. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli/ui/cli.py +127 -67
  16. idm_cli-1.3.3/idm_cli/ui/progress.py +239 -0
  17. idm_cli-1.3.3/idm_cli/ui/prompts.py +322 -0
  18. idm_cli-1.3.3/idm_cli/ui/utils.py +190 -0
  19. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli/update_checker.py +20 -9
  20. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli.egg-info/PKG-INFO +32 -95
  21. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli.egg-info/SOURCES.txt +7 -6
  22. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli.egg-info/requires.txt +6 -3
  23. idm_cli-1.3.3/pyproject.toml +48 -0
  24. {idm_cli-1.3.0 → idm_cli-1.3.3}/requirements.txt +9 -13
  25. idm_cli-1.3.3/tests/test_core.py +129 -0
  26. idm_cli-1.3.3/tests/test_regressions.py +76 -0
  27. idm_cli-1.3.0/MANIFEST.in +0 -2
  28. idm_cli-1.3.0/PKG-INFO +0 -230
  29. idm_cli-1.3.0/idm_cli/__init__.py +0 -3
  30. idm_cli-1.3.0/idm_cli/config.py +0 -75
  31. idm_cli-1.3.0/idm_cli/downloader/core.py +0 -308
  32. idm_cli-1.3.0/idm_cli/downloader/downloader.py +0 -256
  33. idm_cli-1.3.0/idm_cli/downloader/handlers.py +0 -152
  34. idm_cli-1.3.0/idm_cli/downloader/muxer.py +0 -179
  35. idm_cli-1.3.0/idm_cli/downloader/state.py +0 -60
  36. idm_cli-1.3.0/idm_cli/extension/daemon.py +0 -44
  37. idm_cli-1.3.0/idm_cli/extension/extension.py +0 -161
  38. idm_cli-1.3.0/idm_cli/extension/native_host.py +0 -124
  39. idm_cli-1.3.0/idm_cli/extractors/__init__.py +0 -18
  40. idm_cli-1.3.0/idm_cli/extractors/winget.py +0 -72
  41. idm_cli-1.3.0/idm_cli/extractors/ytdlp.py +0 -139
  42. idm_cli-1.3.0/idm_cli/ui/utils.py +0 -151
  43. idm_cli-1.3.0/setup.py +0 -46
  44. {idm_cli-1.3.0 → idm_cli-1.3.3}/LICENSE +0 -0
  45. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli/__main__.py +0 -0
  46. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli/downloader/__init__.py +0 -0
  47. {idm_cli-1.3.0/idm_cli/extension → idm_cli-1.3.3/idm_cli/ui}/__init__.py +0 -0
  48. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli.egg-info/dependency_links.txt +0 -0
  49. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli.egg-info/entry_points.txt +0 -0
  50. {idm_cli-1.3.0 → idm_cli-1.3.3}/idm_cli.egg-info/top_level.txt +0 -0
  51. {idm_cli-1.3.0 → idm_cli-1.3.3}/setup.cfg +0 -0
  52. {idm_cli-1.3.0/idm_cli/ui → idm_cli-1.3.3/tests}/__init__.py +0 -0
@@ -0,0 +1 @@
1
+ include requirements.txt
@@ -1,194 +1,167 @@
1
- # IDM-CLI (Internet Download Manager CLI)
2
-
3
- *Inspired by the official [Internet Download Manager (IDM)](https://www.internetdownloadmanager.com/)*
4
-
5
- A lightning-fast, cross-platform command-line download manager written in Python. IDM-CLI splits files into multiple parallel chunks (default 8, up to 32) to maximize your internet speed. It supports downloading from **YouTube**, **Facebook**, **Instagram**, and any **Direct File URL** (`.exe`, `.zip`, `.pdf`, etc.).
6
-
7
- ## Features
8
-
9
- - **Parallel Chunk Engine** — Splits downloads into multiple concurrent chunks using `aiohttp` async sessions to fully saturate your bandwidth.
10
- - **Universal Downloader** — Paste any direct URL. A built-in HTTP `HEAD` detector automatically recognizes file types and routes them to the parallel engine.
11
- - **Social Media Support** — Natively supports YouTube, Facebook, and Instagram via a modular extractor architecture with yt-dlp.
12
- - **Audio Only / MP3 Conversion** — Download videos as audio. IDM-CLI automatically grabs the best audio stream and uses FFmpeg to convert it to `.mp3`.
13
- - **Smart Auto-Resume** — Internet dropped? Pressed `Ctrl+C`? No problem. IDM-CLI remembers the exact byte positions of all incomplete chunks. Paste the same link again to resume instantly.
14
- - **Persistent Queue System** — Add multiple files to a queue with `-Q` and type `start queue` to download them all sequentially.
15
- - **Browser Extension Integration** — Chrome/Edge extension intercepts downloads and routes them directly into IDM-CLI via Native Messaging.
16
- - **Interactive UI** — Modern terminal interface powered by `rich` and `questionary` with real-time speed, ETA, and progress bars. Press `p` to pause, `r` to resume.
17
- - **Cross-Platform** — Works on Windows, macOS, and Linux with platform-specific FFmpeg handling and browser registration.
18
- - **Auto-Update Check** — Checks PyPI once a day and notifies you when a new version is available.
19
-
20
- ## Prerequisites
21
-
22
- - **Python 3.8+**
23
- - **FFmpeg** — Required for muxing video and audio streams, and converting to `.mp3`. IDM-CLI can auto-download it for you, or you can install it manually:
24
- - Windows: `winget install ffmpeg`
25
- - macOS: `brew install ffmpeg`
26
- - Linux: `sudo apt install ffmpeg`
27
-
28
- ## Installation
29
-
30
- ```bash
31
- # From PyPI
32
- pip install idm-cli
33
-
34
- # From source
35
- git clone https://github.com/rj41-w2/idm-cli.git
36
- cd IDM-CLI
37
- pip install -r requirements.txt
38
- pip install -e .
39
- ```
40
-
41
- ## Usage
42
-
43
- Run the app interactively:
44
-
45
- ```bash
46
- idm
47
- ```
48
-
49
- This opens a prompt where you can paste your link, select video quality, or queue the download.
50
-
51
- ### CLI Flags (Fast Mode)
52
-
53
- Skip the interactive menus by passing arguments directly:
54
-
55
- ```bash
56
- # Download a video at 1080p
57
- idm "https://youtube.com/watch?v=..." -q 1080p -v
58
-
59
- # Audio only (converts to MP3)
60
- idm "https://youtube.com/watch?v=..." -a
61
-
62
- # 16 parallel chunks for maximum speed
63
- idm "https://example.com/largefile.zip" -c 16
64
-
65
- # Add to queue
66
- idm "https://facebook.com/..." -Q
67
- ```
68
-
69
- | Flag | Description |
70
- |------|-------------|
71
- | `-q <resolution>` | Set video quality (e.g., `1080p`, `720p`) |
72
- | `-a` | Audio only — download and convert to MP3 |
73
- | `-v` | Download video + audio (bypasses quality prompt) |
74
- | `-Q` | Add to queue instead of downloading immediately |
75
- | `-c <num>` | Number of parallel chunks (default: 8) |
76
- | `-f <filename>` | Force a custom output filename |
77
-
78
- ### Interactive Commands
79
-
80
- | Command | Description |
81
- |---------|-------------|
82
- | `<URL>` | Download a video or file |
83
- | `resume` | Resume or delete incomplete downloads |
84
- | `start queue` | Process all queued downloads |
85
- | `install extension` | Guide to install the browser extension |
86
- | `help` | Show available commands and flags |
87
- | `exit` | Exit the application |
88
-
89
- ### Browser Extension
90
-
91
- IDM-CLI includes a Chrome/Edge extension that intercepts file downloads automatically. To install it:
92
-
93
- ```bash
94
- idm
95
- # then type:
96
- install extension
97
- ```
98
-
99
- Follow the on-screen guide to load the unpacked extension and link it to IDM-CLI.
100
-
101
- ### Troubleshooting: Windows Device Guard
102
-
103
- If you get `"idm.exe was blocked by your organization's Device Guard policy"`, run the Python module directly:
104
-
105
- ```bash
106
- python -m idm_cli
107
- ```
108
-
109
- ## Architecture
110
-
111
- ```
112
- idm_cli/
113
- ├── config.py # Platform-aware config, logging, paths
114
- ├── update_checker.py # PyPI version check
115
- ├── ui/
116
- │ ├── cli.py # Main interactive CLI
117
- │ └── utils.py # Console, progress listener, validators
118
- ├── downloader/
119
- │ ├── core.py # Download orchestration & FFmpeg setup
120
- │ ├── downloader.py # Async chunk download engine
121
- │ ├── handlers.py # Queue & resume handlers
122
- │ ├── muxer.py # FFmpeg mux/conversion
123
- │ └── state.py # Atomic JSON state persistence
124
- ├── extractors/
125
- │ ├── ytdlp.py # YouTube/social media extractor
126
- │ ├── direct.py # Direct HTTP file downloader
127
- │ └── winget.py # Windows Package Manager extractor
128
- └── extension/
129
- ├── extension.py # Browser extension installer
130
- ├── native_host.py # Native Messaging Host
131
- ├── daemon.py # Queue daemon with PID lock
132
- └── browser_extension/ # Chrome/Edge extension source
133
- ```
134
-
135
- ## Contributing
136
-
137
- Contributions are welcome — whether it's a bug fix, a new feature, or just improving the docs.
138
-
139
- ### Reporting Bugs
140
-
141
- If you find a bug, [open an issue](https://github.com/rj41-w2/idm-cli/issues/new) with:
142
-
143
- - A clear title and description of the problem
144
- - Steps to reproduce the issue
145
- - Your OS and Python version (`python --version`)
146
- - The full error output if there is one
147
-
148
- ### Suggesting Features
149
-
150
- Got an idea? [Open an issue](https://github.com/rj41-w2/idm-cli/issues/new) with the tag `enhancement` and describe:
151
-
152
- - What you want to happen and why
153
- - How it would work from the user's perspective
154
- - Any alternatives you considered
155
-
156
- ### Submitting a Pull Request
157
-
158
- 1. **Fork** the repository from [github.com/rj41-w2/idm-cli](https://github.com/rj41-w2/idm-cli)
159
-
160
- 2. **Clone your fork** and set it up:
161
- ```bash
162
- git clone https://github.com/<your-username>/idm-cli.git
163
- cd IDM-CLI
164
- pip install -r requirements.txt
165
- pip install -e .
166
- ```
167
-
168
- 3. **Create a branch** for your change:
169
- ```bash
170
- git checkout -b fix/short-description
171
- ```
172
-
173
- 4. **Make your changes**, test them, and commit with a clear message:
174
- ```bash
175
- git commit -m "fix: describe the bug you fixed"
176
- ```
177
-
178
- 5. **Push** to your fork and open a Pull Request against `main`:
179
- ```bash
180
- git push origin fix/short-description
181
- ```
182
-
183
- 6. In your PR description, explain **what changed** and **why**. Link the issue if there is one.
184
-
185
- ### Guidelines
186
-
187
- - Keep PRs focused on a single change. Don't mix unrelated fixes.
188
- - Follow the existing code style — no comments unless absolutely necessary.
189
- - Test your changes on at least one platform before submitting.
190
- - If you're adding a feature, update the README and spec if needed.
191
-
192
- ## License
193
-
194
- This project is licensed under the [MIT License](LICENSE).
1
+ Metadata-Version: 2.4
2
+ Name: idm-cli
3
+ Version: 1.3.3
4
+ Summary: A lightning-fast, universal command-line download manager
5
+ Author: Rehan
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/rj41-w2/idm-cli
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Environment :: Console
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: typer
15
+ Requires-Dist: rich
16
+ Requires-Dist: curl-cffi>=0.7.0
17
+ Requires-Dist: aiofiles
18
+ Requires-Dist: yt-dlp
19
+ Requires-Dist: pyfiglet
20
+ Requires-Dist: questionary
21
+ Requires-Dist: psutil
22
+ Requires-Dist: platformdirs
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest; extra == "dev"
25
+ Requires-Dist: pytest-asyncio; extra == "dev"
26
+ Requires-Dist: pytest-cov; extra == "dev"
27
+ Requires-Dist: packaging; extra == "dev"
28
+ Requires-Dist: ruff; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ <div align="center">
32
+
33
+ <h1>IDM-CLI</h1>
34
+
35
+ **A lightning-fast, cross-platform command-line download manager written in Python.**
36
+
37
+ *The official IDM asks you to pay after 30 days — IDM-CLI is 100% free, open-source, and yours to modify!*
38
+
39
+ [![PyPI version](https://img.shields.io/pypi/v/idm-cli?color=blue&label=pypi%20version)](https://pypi.org/project/idm-cli/)
40
+ [![Downloads](https://static.pepy.tech/badge/idm-cli)](https://pepy.tech/project/idm-cli)
41
+ [![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/rj41-w2/idm-cli/blob/main/LICENSE)
42
+ ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)
43
+ [![Install](https://img.shields.io/badge/install-pip%20install%20idm--cli-brightgreen)](https://pypi.org/project/idm-cli/)
44
+
45
+ [Download via PyPI](https://pypi.org/project/idm-cli/) · [Report a Bug](https://github.com/rj41-w2/idm-cli/issues)
46
+
47
+ </div>
48
+
49
+ IDM-CLI splits files into multiple parallel chunks (default 8, up to 32) to maximize your internet speed. It supports downloading from **YouTube**, **Facebook**, **Instagram**, and any **Direct File URL** (`.exe`, `.zip`, `.pdf`, etc.).
50
+
51
+ ## Features
52
+
53
+ - **Parallel Chunk Engine** — Splits downloads into multiple concurrent chunks using `curl-cffi` async sessions to fully saturate your bandwidth.
54
+ - **Universal Downloader** — Paste any URL. yt-dlp handles 1000+ sites (YouTube, Facebook, Instagram, etc.), with automatic fallback to direct HTTP download for unsupported URLs.
55
+ - **Audio Only / MP3 Conversion** — Download videos as audio. IDM-CLI automatically grabs the best audio stream and uses FFmpeg to convert it to `.mp3`.
56
+ - **Smart Auto-Resume** — Internet dropped? Pressed `Ctrl+C`? No problem. IDM-CLI remembers the exact byte positions of all incomplete chunks. Paste the same link again to resume instantly.
57
+ - **Persistent Queue System** — Add multiple files to a queue with `-Q` and type `start queue` to download them all sequentially.
58
+ - **Interactive UI** — Modern terminal interface powered by `rich` and `questionary` with real-time speed, ETA, and progress bars. Press `p` to pause, `r` to resume.
59
+ - **Cross-Platform** — Works on Windows, macOS, and Linux with platform-specific FFmpeg handling.
60
+ - **Auto-Update Check** — Checks PyPI once a day and notifies you when a new version is available.
61
+
62
+ ## Prerequisites
63
+
64
+ - **Python 3.8+**
65
+ - **FFmpeg** — Required for muxing video and audio streams, and converting to `.mp3`. IDM-CLI can auto-download it for you, or you can install it manually:
66
+ - Windows: `winget install ffmpeg`
67
+ - macOS: `brew install ffmpeg`
68
+ - Linux: `sudo apt install ffmpeg`
69
+
70
+ ## Installation
71
+
72
+ ```bash
73
+ # From PyPI
74
+ pip install idm-cli
75
+
76
+ # From source
77
+ git clone https://github.com/rj41-w2/idm-cli.git
78
+ cd IDM-CLI
79
+ pip install -r requirements.txt
80
+ pip install -e .
81
+ ```
82
+
83
+ ## Usage
84
+
85
+ Run the app interactively:
86
+
87
+ ```bash
88
+ idm
89
+ ```
90
+
91
+ This opens a prompt where you can paste your link, select video quality, or queue the download.
92
+
93
+ ### CLI Flags (Fast Mode)
94
+
95
+ Skip the interactive menus by passing arguments directly:
96
+
97
+ ```bash
98
+ # Download a video at 1080p
99
+ idm "https://youtube.com/watch?v=..." -q 1080p -v
100
+
101
+ # Audio only (converts to MP3)
102
+ idm "https://youtube.com/watch?v=..." -a
103
+
104
+ # 16 parallel chunks for maximum speed
105
+ idm "https://example.com/largefile.zip" -c 16
106
+
107
+ # Add to queue
108
+ idm "https://facebook.com/..." -Q
109
+ ```
110
+
111
+ | Flag | Description |
112
+ |------|-------------|
113
+ | `-q <resolution>` | Set video quality (e.g., `1080p`, `720p`) |
114
+ | `-a` | Audio only — download and convert to MP3 |
115
+ | `-v` | Download video + audio (bypasses quality prompt) |
116
+ | `-Q` | Add to queue instead of downloading immediately |
117
+ | `-c <num>` | Number of parallel chunks (default: 8) |
118
+ | `-f <filename>` | Force a custom output filename |
119
+
120
+ ### Interactive Commands
121
+
122
+ | Command | Description |
123
+ |---------|-------------|
124
+ | `<URL>` | Download a video or file |
125
+ | `resume` | Resume or delete incomplete downloads |
126
+ | `start queue` | Process all queued downloads |
127
+ | `help` | Show available commands and flags |
128
+ | `exit` | Exit the application |
129
+
130
+ ### Troubleshooting: Windows Device Guard
131
+
132
+ If you get `"idm.exe was blocked by your organization's Device Guard policy"`, run the Python module directly:
133
+
134
+ ```bash
135
+ python -m idm_cli
136
+ ```
137
+
138
+ ## Architecture
139
+
140
+ ```
141
+ idm_cli/
142
+ ├── config.py # Platform-aware config, logging, paths
143
+ ├── update_checker.py # PyPI version check
144
+ ├── ui/
145
+ │ ├── cli.py # Main interactive CLI
146
+ │ └── utils.py # Console, progress listener, validators
147
+ ├── downloader/
148
+ │ ├── core.py # Download orchestration & FFmpeg setup
149
+ │ ├── downloader.py # Async chunk download engine
150
+ │ ├── handlers.py # Queue & resume handlers
151
+ │ ├── muxer.py # FFmpeg mux/conversion
152
+ │ └── state.py # Atomic JSON state persistence
153
+ ├── extractors/
154
+ │ ├── ytdlp.py # YouTube/social media extractor
155
+ │ ├── direct.py # Direct HTTP file downloader
156
+ │ └── winget.py # Windows Package Manager extractor
157
+ ```
158
+
159
+ ## Contributing
160
+
161
+ Contributions are welcome. Fork the repo, make your changes on a feature branch, and open a PR against `main`. Keep changes focused and follow the existing code style.
162
+
163
+ For bug reports and feature requests, [open an issue](https://github.com/rj41-w2/idm-cli/issues).
164
+
165
+ ## License
166
+
167
+ This project is licensed under the [MIT License](LICENSE).
@@ -0,0 +1,137 @@
1
+ <div align="center">
2
+
3
+ <h1>IDM-CLI</h1>
4
+
5
+ **A lightning-fast, cross-platform command-line download manager written in Python.**
6
+
7
+ *The official IDM asks you to pay after 30 days — IDM-CLI is 100% free, open-source, and yours to modify!*
8
+
9
+ [![PyPI version](https://img.shields.io/pypi/v/idm-cli?color=blue&label=pypi%20version)](https://pypi.org/project/idm-cli/)
10
+ [![Downloads](https://static.pepy.tech/badge/idm-cli)](https://pepy.tech/project/idm-cli)
11
+ [![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/rj41-w2/idm-cli/blob/main/LICENSE)
12
+ ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)
13
+ [![Install](https://img.shields.io/badge/install-pip%20install%20idm--cli-brightgreen)](https://pypi.org/project/idm-cli/)
14
+
15
+ [Download via PyPI](https://pypi.org/project/idm-cli/) · [Report a Bug](https://github.com/rj41-w2/idm-cli/issues)
16
+
17
+ </div>
18
+
19
+ IDM-CLI splits files into multiple parallel chunks (default 8, up to 32) to maximize your internet speed. It supports downloading from **YouTube**, **Facebook**, **Instagram**, and any **Direct File URL** (`.exe`, `.zip`, `.pdf`, etc.).
20
+
21
+ ## Features
22
+
23
+ - **Parallel Chunk Engine** — Splits downloads into multiple concurrent chunks using `curl-cffi` async sessions to fully saturate your bandwidth.
24
+ - **Universal Downloader** — Paste any URL. yt-dlp handles 1000+ sites (YouTube, Facebook, Instagram, etc.), with automatic fallback to direct HTTP download for unsupported URLs.
25
+ - **Audio Only / MP3 Conversion** — Download videos as audio. IDM-CLI automatically grabs the best audio stream and uses FFmpeg to convert it to `.mp3`.
26
+ - **Smart Auto-Resume** — Internet dropped? Pressed `Ctrl+C`? No problem. IDM-CLI remembers the exact byte positions of all incomplete chunks. Paste the same link again to resume instantly.
27
+ - **Persistent Queue System** — Add multiple files to a queue with `-Q` and type `start queue` to download them all sequentially.
28
+ - **Interactive UI** — Modern terminal interface powered by `rich` and `questionary` with real-time speed, ETA, and progress bars. Press `p` to pause, `r` to resume.
29
+ - **Cross-Platform** — Works on Windows, macOS, and Linux with platform-specific FFmpeg handling.
30
+ - **Auto-Update Check** — Checks PyPI once a day and notifies you when a new version is available.
31
+
32
+ ## Prerequisites
33
+
34
+ - **Python 3.8+**
35
+ - **FFmpeg** — Required for muxing video and audio streams, and converting to `.mp3`. IDM-CLI can auto-download it for you, or you can install it manually:
36
+ - Windows: `winget install ffmpeg`
37
+ - macOS: `brew install ffmpeg`
38
+ - Linux: `sudo apt install ffmpeg`
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ # From PyPI
44
+ pip install idm-cli
45
+
46
+ # From source
47
+ git clone https://github.com/rj41-w2/idm-cli.git
48
+ cd IDM-CLI
49
+ pip install -r requirements.txt
50
+ pip install -e .
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ Run the app interactively:
56
+
57
+ ```bash
58
+ idm
59
+ ```
60
+
61
+ This opens a prompt where you can paste your link, select video quality, or queue the download.
62
+
63
+ ### CLI Flags (Fast Mode)
64
+
65
+ Skip the interactive menus by passing arguments directly:
66
+
67
+ ```bash
68
+ # Download a video at 1080p
69
+ idm "https://youtube.com/watch?v=..." -q 1080p -v
70
+
71
+ # Audio only (converts to MP3)
72
+ idm "https://youtube.com/watch?v=..." -a
73
+
74
+ # 16 parallel chunks for maximum speed
75
+ idm "https://example.com/largefile.zip" -c 16
76
+
77
+ # Add to queue
78
+ idm "https://facebook.com/..." -Q
79
+ ```
80
+
81
+ | Flag | Description |
82
+ |------|-------------|
83
+ | `-q <resolution>` | Set video quality (e.g., `1080p`, `720p`) |
84
+ | `-a` | Audio only — download and convert to MP3 |
85
+ | `-v` | Download video + audio (bypasses quality prompt) |
86
+ | `-Q` | Add to queue instead of downloading immediately |
87
+ | `-c <num>` | Number of parallel chunks (default: 8) |
88
+ | `-f <filename>` | Force a custom output filename |
89
+
90
+ ### Interactive Commands
91
+
92
+ | Command | Description |
93
+ |---------|-------------|
94
+ | `<URL>` | Download a video or file |
95
+ | `resume` | Resume or delete incomplete downloads |
96
+ | `start queue` | Process all queued downloads |
97
+ | `help` | Show available commands and flags |
98
+ | `exit` | Exit the application |
99
+
100
+ ### Troubleshooting: Windows Device Guard
101
+
102
+ If you get `"idm.exe was blocked by your organization's Device Guard policy"`, run the Python module directly:
103
+
104
+ ```bash
105
+ python -m idm_cli
106
+ ```
107
+
108
+ ## Architecture
109
+
110
+ ```
111
+ idm_cli/
112
+ ├── config.py # Platform-aware config, logging, paths
113
+ ├── update_checker.py # PyPI version check
114
+ ├── ui/
115
+ │ ├── cli.py # Main interactive CLI
116
+ │ └── utils.py # Console, progress listener, validators
117
+ ├── downloader/
118
+ │ ├── core.py # Download orchestration & FFmpeg setup
119
+ │ ├── downloader.py # Async chunk download engine
120
+ │ ├── handlers.py # Queue & resume handlers
121
+ │ ├── muxer.py # FFmpeg mux/conversion
122
+ │ └── state.py # Atomic JSON state persistence
123
+ ├── extractors/
124
+ │ ├── ytdlp.py # YouTube/social media extractor
125
+ │ ├── direct.py # Direct HTTP file downloader
126
+ │ └── winget.py # Windows Package Manager extractor
127
+ ```
128
+
129
+ ## Contributing
130
+
131
+ Contributions are welcome. Fork the repo, make your changes on a feature branch, and open a PR against `main`. Keep changes focused and follow the existing code style.
132
+
133
+ For bug reports and feature requests, [open an issue](https://github.com/rj41-w2/idm-cli/issues).
134
+
135
+ ## License
136
+
137
+ This project is licensed under the [MIT License](LICENSE).
@@ -0,0 +1,3 @@
1
+ # IDM-CLI Package
2
+
3
+ __version__ = "1.3.3"