megatools-dl
Download files from MEGA accounts
TLDR
Download files from a mega.nz link into the current directory
Download files from a mega.nz link into a specific directory
Interactively choose which files to download
Limit the download speed in KiB/s
SYNOPSIS
megatools-dl [OPTIONS] <URL|PATH> ...
PARAMETERS
<URL|PATH>
The Mega.nz URL (e.g., public link) or a path to a file/folder within your Mega.nz account (when authenticated).
-k, --no-confirm
Do not ask for confirmation before downloading.
-v, --verbose
Enable verbose output, showing more details about the download process.
-q, --quiet
Suppress all non-error output, useful for scripting.
--ignore-html-errors
Proceed with download even if HTML parsing errors occur. Useful for links embedded in HTML.
--ignore-quota-errors
Continue downloading even if Mega.nz reports quota errors. Use with caution.
--no-progress
Do not display the progress bar during downloads.
--path=PATH
Specify the destination directory where downloaded files will be saved. Defaults to the current directory.
--user=USER
Your Mega.nz username for accessing private files. Can also be set via configuration file or environment variable.
--password=PASS
Your Mega.nz password. Avoid providing directly on the command line for security; prefer config files or environment variables.
--limit-speed=BYTES
Limit the download speed in bytes per second (e.g., '1M' for 1 megabyte per second).
--proxy=URL
Use a specified proxy server for connections (e.g., 'socks5://localhost:9050').
--config=FILE
Use an alternative configuration file instead of the default (~/.megarc).
--version
Display program version and exit.
--help
Show help message and exit.
DESCRIPTION
megatools-dl is a powerful command-line utility for downloading files and directories from the Mega.nz cloud storage service. Part of the megatools suite, it provides a flexible way to interact with Mega.nz directly from your terminal.
It supports both public Mega.nz links (without requiring authentication) and private files or folders (which require a Mega.nz username and password). Key features include the ability to resume interrupted downloads, download entire folder hierarchies recursively, and manage multiple download tasks efficiently. It is particularly useful for scripting and automating Mega.nz file transfers.
CAVEATS
When dealing with private files, providing your password directly on the command line (via --password) can be a security risk as it might be visible in process listings or command history. It's recommended to store credentials in a configuration file (~/.megarc) or use environment variables.
Mega.nz enforces quota limits for free accounts, which may impact large or frequent downloads. Exceeding these limits can temporarily prevent further downloads.
AUTHENTICATION METHODS
For accessing private Mega.nz files, megatools-dl supports multiple authentication methods beyond direct command-line arguments. You can store your username and password securely in a configuration file (typically ~/.megarc) or export them as environment variables (e.g., MEGA_USER, MEGA_PASS). Using a config file or environment variables is generally preferred for security.
RESUMING DOWNLOADS
megatools-dl supports resuming interrupted downloads. If a download is stopped prematurely, running the same command again will attempt to continue from where it left off, saving bandwidth and time. This feature is particularly useful for large files or unstable network connections.
HISTORY
megatools-dl is an integral part of the megatools project, initiated by megous. The project was created to provide a robust, open-source command-line interface for the Mega.nz cloud storage service, addressing the lack of official CLI tools. Its development has focused on reliability and comprehensive feature support, making Mega.nz accessible for scripting and automation tasks since its inception.