Crates.io | gamedig_cli |
lib.rs | gamedig_cli |
version | 0.2.1 |
source | src |
created_at | 2024-11-26 02:00:34.929815 |
updated_at | 2024-12-05 21:41:33.100969 |
description | A command line interface for gamedig |
homepage | https://gamedig.github.io/ |
repository | https://github.com/gamedig/rust-gamedig |
max_upload_size | |
id | 1461095 |
size | 62,637 |
The official rust-GameDig Command Line Interface.
You can install the CLI via cargo
:
cargo install gamedig_cli
or
cargo install gamedig_cli --git https://github.com/gamedig/rust-gamedig.git
Running gamedig_cli
without any arguments will display the usage information. You can also use the --help
(or -h
) flag to see detailed usage instructions.
Here's also a quick rundown of a simple query with the json-pretty
format:
Pick a game/service/protocol (check the GAMES, SERVICES and PROTOCOLS files to see the currently supported ones), provide the ip and the port (be aware that some game servers use a separate port for the info queries, the port can also be optional if the server is running the default ports) then query on it.
Team Fortress 2 query example:
gamedig_cli query -g teamfortress2 -i 127.0.0.1 -f json-pretty
What we are doing here:
-g
(or --game
) specifies the game.-i
(or --ip
) target ip.-f
(or --format
) our preferred format.Note: We haven't specified a port (via -p
or --port
), so the default one for the game will be used (27015
in this
case).
Response (note that some games have a different structure):
{
"name": "A cool server.",
"description": null,
"game_mode": "Team Fortress",
"game_version": "8690085",
"map": "cp_foundry",
"players_maximum": 24,
"players_online": 0,
"players_bots": 0,
"has_password": false,
"players": []
}
Please read CONTRIBUTING.