* chore(deps): update crc32fast to v1.5 * chore(deps): update ureq to v2.12 * chore(deps): update phf to v0.13 * chore(deps): update clap to v4.5 * chore(deps): update lazy_static to v1.5 * chore(deps): update thiserror to v2.0.16 * chore(deps): update clap to v4.5 * chore(deps): update bson to v2.15 * chore(deps): update base64 to v0.22 * chore(deps): update quick-xml to v0.38 * chore(deps): update webbrowser to v1.0 * chore(clippy): fix a load of "variables can be used directly" * chore(ci): update MSRV toolchain to 1.82.0 * chore(pre-commit): update MSRV to 1.82.0 * chore(README): update Minimum Supported Rust Version to 1.82.0 * chore(VERSIONS): update MSRV to 1.82.0 * chore(cli): bump version to 0.4.0 and update MSRV to 1.82.0 * chore(release): bump version to 0.8.0 and update MSRV to 1.82.0 |
||
|---|---|---|
| .. | ||
| .cargo | ||
| src | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE.md | ||
| README.md | ||
Rust GameDig CLI
The official rust-GameDig Command Line Interface.
Installation
You can install the CLI via cargo:
cargo install gamedig_cli
or
cargo install gamedig_cli --git https://github.com/gamedig/rust-gamedig.git
Usage
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": []
}
Contributing
Please read CONTRIBUTING.