megatools-dl(1)

✨ megatools-dl β€” like, the downloader one πŸ’–

okay bestie, sit DOWN because this is the megatools-dl(1) page and it's about to be your new fave. It's part of the megatools family, it grabs your stuff off Mega.nz, and I'm gonna walk you through every single crumb. no skimming, no skipping, we're doing the whole thing. πŸŽ€


🌸 NAME 🌸

megatools dl β€” download exported files and directories from Mega.nz πŸ¦‹


✨ SYNOPSIS ✨

megatools dl [--no-progress] [--path <path>] <links>...
megatools dl --path - <filelink>
heads up: that second line is a whole different mode. <path> being - means the file gets streamed to stdout, and it only takes one <filelink>. not a vibe you can mix and match, okay? πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

So basically: this thing downloads exported files AND folders from Mega.nz. It handles links that look like this:

When you're downloading individual files, they land in <path>. When you're downloading folders, the contents of the folder get dropped into the directory that <path> points at. (yes, contents. the folder itself doesn't nest in there. the way that works is so specific and I respect it.)

And how do you even get exported files in the first place? Two ways, bestie:

periodt. πŸ’«


🌈 OPTIONS 🌈

  • --path <path> β€” the local directory you're downloading into. defaults to the current working directory. BUT β€” if <path> is -, the remote file gets streamed straight to stdout. main character behaviour, honestly. πŸ”₯
  • --no-progress β€” turns off the download progress reporting. ngl this one gets implied automatically when you're streaming, so don't stress about it. 🫢
  • --print-names β€” prints the names/paths of files that downloaded successfully, one per line. cute lil receipt. 🧾
  • --choose-files β€” prints every file in a shared folder and lets you pick which files or subfolders to download. and if you pick a subfolder? the entire subfolder comes down. no half measures. πŸ‘‘
  • --disable-resume β€” stops it from resuming downloads off a partially downloaded file. the default is to resume, so this is you actively choosing chaos (or a fresh start, no judgement πŸ’€).
  • --limit-speed <speed> β€” sets the max allowed upload AND download speed, in KiB/s. this overrides whatever the config file says. 0 means no limit at all, go feral. important: when ParallelTransfers > 1, the upload speed limit gets applied to each transfer individually β€” not shared across them.
  • --proxy <proxy> β€” routes the connection to mega.nz through a proxy server. overrides the config file settings. more info lives in the libcurl docs at https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html. some acceptable values are:
    • none : disables the proxy if it was enabled in the config file
    • socks5://localhost:9050 : a local SOCKSv5 proxy server
    • socks5h://localhost:9050 : a local SOCKSv5 proxy server, except DNS is handled by the proxy
  • --netif <ifname|ip> β€” the network interface (or local IP address) used for outgoing connections. psa: if you're giving it an IP address, it has to be an IP address bound to one of your local network interfaces. don't just make one up bestie 😭
  • --ip-proto <proto> β€” which IP protocol to prefer when connecting to mega.nz: v4, v6, or any. it's just an advisory thing, not a demand β€” megatools resolves the mega.nz domain and then picks an A or AAAA record based on the preference you stated. vibe check, not a rule. 🌈
  • --config <path> β€” load configuration from a file πŸ“„
  • --ignore-config-file β€” stops it from loading .megarc πŸ™ˆ
  • --debug [<options>] β€” turns on debugging for various aspects of megatools. you can stack multiple debug options separated by commas (eg. --debug api,fs). the available options are:
    • http: dumps HTTP request/response details (super useful for debugging connection/proxy issues)
    • api: dumps Mega.nz API calls
    • fs: dumps the Mega.nz filesystem (might need --reload before it actually prints anything)
    • cache: dumps the cache contents
    • tman: dumps transfer manager events
  • --version β€” shows version info ⭐
  • <links> β€” the file and folder links you wanna download from.
  • <filelink> β€” the link to the exported file you wanna stream.

πŸŽ€ EXAMPLES πŸŽ€

  • download an exported file:
$ megatools dl 'https://mega.nz/#!7YVWhCzZ!bauBlAkKKvv8hIm-8-qFmGOYS289ToQWN7rGFPzXB_w'
  • download an exported folder:
$ megatools dl 'https://mega.nz/#F!HIlFDajT!HLiVvQQkSe1d0ogxZuaOJg'

like, that's it. two lines. ate. πŸ’…βœ¨


πŸ¦‹ REMOTE FILESYSTEM πŸ¦‹

okay this part is lowkey the most interesting bit, stay with me.

The Mega.nz filesystem is represented as a tree of nodes of various types. every node is identified by an 8 character node handle (eg. 7Fdi3ZjC). and fun fact: the structure of the filesystem is not encrypted. πŸ‘€

Megatools maps that node tree structure onto traditional filesystem paths (eg. /Root/SomeFile.DAT).

NOTE: because of the nature of Mega.nz storage, several files in the same directory can have the same name. to let you actually reach them, conflicting filenames get extended by appending a dot and their node handle, like this:
/Root/conflictingfile
/Root/conflictingfile.7Fdi3ZjC
/Root/conflictingfile.mEU23aSD

and you NEED to be aware of these special folders, bestie, they're iconic:

  • /Root β€” the writable directory representing the root of the filesystem.
  • /Trash β€” the trash directory where the Mega.nz web client moves deleted files. note: this directory is NOT used by megatools when removing files. it just lives there. chilling.
  • /Inbox β€” not sure. πŸ’€ (that's genuinely what the manpage says, I'm not gatekeeping anything from you)
  • /Contacts β€” a directory containing subdirectories representing your contacts list. if you wanna add contacts to the list, you literally just create a subdirectory named after the contact you want to add. that's the whole mechanic. slay.
  • /Contacts/<email> β€” directories representing individual contacts in your contacts list. these directories contain folders that other people shared with you. and all shared files are read-only at the moment, so look don't touch. 🫢

πŸ’« SEE ALSO πŸ’«

megatools(1), megarc(5), megatools-df(1), megatools-dl(1), megatools-get(1), megatools-ls(1), megatools-mkdir(1), megatools-put(1), megatools-reg(1), megatools-rm(1), megatools-copy(1).

(go read them, they're all part of the same friend group πŸ«‚)


πŸ‘‘ MEGATOOLS πŸ‘‘

Part of the megatools(1) suite of commands. πŸŽ€


πŸ’€ BUGS πŸ’€

ngl there is no upstream support for bugreports and feature requests. none. zero. that's the situation. BUT β€” you can send code patches to megatools@xff.cz to get them integrated into the upstream repository. so if you've got the fix, bring the fix. patches only, bestie. πŸ”₯


πŸ’– AUTHOR πŸ’–

Megatools was written by Ondrej Jirman < megatools@xff.cz >, 2013-2022.

Official website is https://xff.cz/megatools/. 🌐


and that's the whole page!! you made it to the end, I'm so proud of you fr fr. πŸ₯Ή

this was the megatools-dl(1) manual page, dated 11 July 2025 β€” mwah, go download something iconic. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from