rust-gamedig/crates/cli
dependabot[bot] ddd95be413
chore(deps): update webbrowser requirement in /crates/cli (#201)
Updates the requirements on [webbrowser](https://github.com/amodm/webbrowser-rs) to permit the latest version.
- [Release notes](https://github.com/amodm/webbrowser-rs/releases)
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.8.12...v1.0.0)

---
updated-dependencies:
- dependency-name: webbrowser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-28 22:43:27 +03:00
..
src fix: add xml utf8 and semver declaration 2024-02-02 21:10:41 +00:00
Cargo.toml chore(deps): update webbrowser requirement in /crates/cli (#201) 2024-04-28 22:43:27 +03:00
CHANGELOG.md chore: reformat markdown files 2024-04-14 23:08:11 +03:00
README.md chore: reformat markdown files 2024-04-14 23:08:11 +03:00

rust-GameDig CLI

The official rust-GameDig Command Line Interface.

CI Latest Version Crates.io License:MIT node coverage

Community

Checkout the GameDig Community Discord Server here.
Note that it isn't be a replacement for GitHub issues, if you have found a problem within the library or want to request a feature, it's better to do so here rather than on Discord.

Usage

Just by running gamedig-cli prints the usage.
Note: Passing --help (or -h) shows the usage.

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": []
}

Documentation

The documentation is available at docs.rs.
Curious about the history and what changed between versions? Everything is in the CHANGELOG file.

Contributing

Please read CONTRIBUTING.