gamedig_cli

Crates.iogamedig_cli
lib.rsgamedig_cli
version0.2.1
sourcesrc
created_at2024-11-26 02:00:34.929815
updated_at2024-12-05 21:41:33.100969
descriptionA command line interface for gamedig
homepagehttps://gamedig.github.io/
repositoryhttps://github.com/gamedig/rust-gamedig
max_upload_size
id1461095
size62,637
CosminPerRam (CosminPerRam)

documentation

README

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.

Commit count: 585

cargo fmt