Crates.io | mcdl |
lib.rs | mcdl |
version | 0.0.2 |
source | src |
created_at | 2021-10-26 19:38:08.902484 |
updated_at | 2021-10-26 21:26:37.43838 |
description | Minecraft server executable downloader |
homepage | |
repository | |
max_upload_size | |
id | 472053 |
size | 22,892 |
Automatically download minecraft server jars in one line (or one click)
cargo install mcdl
mcdl
- download latest server as server.jar
mcdl -s
- download latest snapshot jarmcdl -sp
- print latest snapshot versionmcdl -n
- download latest server as server-1.17.1.jar
mcdl -n 1.16.5
- download 1.16.5 as server-1.16.5.jar
USAGE:
mcdl.exe [FLAGS] [OPTIONS] [--] [VERSION]...
FLAGS:
-h, --help Prints help information
-i, --insecure Don't check the sha1 for the file
-l, --latest Use latest version, snapshot or not
-n, --named Use the version as the file name
-p, --print Print the version instead of downloading it
-q, --quiet Don't print any unnecessary output
-s, --snapshot Use the latest snapshot
-V, --version Prints version information
OPTIONS:
-r, --rename <rename>... Provide a file name (.jar) is appended
ARGS:
<VERSION>... Get a specific version
I thought it would be fun to write in Rust. If you wanted a single line of bash to do it, use one of these (requires jq
, curl
, and wget
):
Download latest available (snapshot or release) minecraft server.jar
curl -s $(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | jq -r ".versions[0].url") | jq -r ".downloads.server.url" | xargs wget
Download latest release minecraft server.jar
curl -s $(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | jq -r ".latest.release as \$v | .versions[] | select(.id == \$v) | .url") | jq -r ".downloads.server.url" | xargs wget
Download latest snapshot minecraft server.jar
curl -s $(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | jq -r ".latest.snapshot as \$v | .versions[] | select(.id == \$v) | .url") | jq -r ".downloads.server.url" | xargs wget