@swetier/mcping
v1.0.1
Published
CLI to ping a Minecraft server and show its status
Maintainers
Readme
mcping
Installation
Run it instantly with npx:
npx @swetier/mcping <host>Or install it globally:
npm install -g @swetier/mcpingUsage
mcping play.hypixel.netExample output:
Server
────────────────────────────────
Status: Online
Address: play.hypixel.net:25565
Version: Requires MC 1.8 / 1.21
Protocol: 47
Players: 17453/200000
Latency: 194ms
MOTD: Hypixel Network
────────────────────────────────Options
Option Description
-p, --port Server port -j, --json Output server information as JSON -d, --debug Enable debug logs -v, --version Show the current version -h, --help Show help
Custom port
mcping play.example.com --port 25565JSON output
mcping play.example.com --json
{
"status": "online",
"address": "play.example.com",
"port": 25565,
"version": {
"name": "1.21.1",
"protocol": 767
},
"players": {
"online": 42,
"max": 100
},
"motd": "A Minecraft Server",
"latency": 38
}Debug mode
mcping play.example.com --debugFeatures
- Minecraft Java server status
- Player count
- Minecraft version
- Protocol version
- MOTD
- Latency measurement
- Custom ports
- JSON output
- Debug logging
- SRV record support
- Connection error handling
- Lightweight CLI
Requirements
Node.js 18 or newer
Development
git clone https://github.com/swetiers/mcping.git
cd mcping
npm installBuild the project:
npm run buildTest locally:
node dist/index.js play.hypixel.netLicense - MIT
