npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

minecraft-server-dl-cli

v0.1.0

Published

Download official Minecraft Java server.jar by version.

Readme

minecraft-server-dl-cli

npm version Node.js License: MIT

一個簡易的 CLI 工具,用來依照指定版本下載官方 Minecraft Java server.jar

這個工具會讀取 Mojang 官方版本清單,解析指定的 Minecraft Java 版本,下載對應的 server.jar,並在 metadata 有提供時使用 SHA1 驗證下載結果。

語言

功能

  • 依照版本下載官方 Minecraft Java server.jar
  • 使用 Mojang 官方版本 manifest
  • 預設輸出檔名為 server_<version>.jar
  • 支援自訂輸出路徑
  • 支援 SHA1 與檔案大小驗證
  • 可只印出解析後的下載 URL,不下載檔案
  • 不需要額外 runtime dependencies

官方資料來源

本工具使用 Mojang/Minecraft 官方端點:

解析後的 server.jar 下載 URL 通常會長這樣:

https://piston-data.mojang.com/v1/objects/<sha1>/server.jar

系統需求

  • Node.js 18 或更新版本
  • npm、pnpm 或 yarn

安裝

從 npm 全域安裝:

npm install -g minecraft-server-dl-cli

執行:

mc-server-dl 1.21.8

或直接使用 npx

npx minecraft-server-dl-cli 1.21.8

使用方式

mc-server-dl <version> [options]

範例:

mc-server-dl 1.21.8

會下載成:

server_1.21.8.jar

參數

| 參數 | 說明 | | --------------------- | ------------------------------ | | -o, --output <path> | 自訂輸出路徑 | | --no-verify | 跳過 SHA1 與檔案大小驗證 | | --url-only | 只印出解析後的 server.jar URL,不下載檔案 | | -h, --help | 顯示說明 |

範例

下載指定 Minecraft Java server 版本:

mc-server-dl 1.21.8

下載到指定路徑:

mc-server-dl 1.21.8 -o ./servers/1.21.8/server.jar

只印出官方下載 URL:

mc-server-dl 1.21.8 --url-only

跳過驗證:

mc-server-dl 1.21.8 --no-verify

Exit Codes

| Code | 意義 | | ---: | --------------------------- | | 0 | 成功 | | 1 | 未預期錯誤 | | 2 | CLI 參數錯誤 | | 3 | metadata 取得或解析失敗 | | 4 | 找不到指定 Minecraft 版本 | | 5 | 版本存在,但沒有官方 server.jar 可下載 | | 6 | 下載失敗 | | 7 | 檔案大小或 SHA1 驗證失敗 |

運作方式

  1. 取得 Mojang version manifest。
  2. 找到使用者指定的 Minecraft Java 版本。
  3. 取得該版本的 metadata JSON。
  4. 讀取 downloads.server.url
  5. 下載官方 server.jar
  6. 若 metadata 有提供,驗證檔案大小與 SHA1。

免責聲明

本專案與 Mojang Studios 或 Microsoft 沒有關聯。

Minecraft 是 Mojang Synergies AB 的商標。本工具只會解析並下載 Mojang/Minecraft 官方端點提供的檔案。

授權

MIT