rust-gamedig/crates/cli
2024-12-05 21:32:23 +00:00
..
.cargo fix(cli): add explicit cargo config for crate 2024-07-16 22:49:09 +01:00
src refactor(cli): improve how we serve the bin to users 2024-11-26 02:05:36 +00:00
Cargo.toml chore(cli): add patch to semver and update changelog 2024-12-05 21:32:23 +00:00
CHANGELOG.md chore(cli): add patch to semver and update changelog 2024-12-05 21:32:23 +00:00
LICENSE.md refactor(cli): improve how we serve the bin to users 2024-11-26 02:05:36 +00:00
README.md chore(cli): fix typos in readme 2024-11-26 13:12:10 +00:00

Rust GameDig CLI

The official rust-GameDig Command Line Interface.

CI License:MIT node coverage

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.