{"id":18268542,"url":"https://github.com/viral32111/rcon","last_synced_at":"2025-04-04T23:31:08.998Z","repository":{"id":50681762,"uuid":"519011248","full_name":"viral32111/rcon","owner":"viral32111","description":"Command-line RCON client for Minecraft \u0026 Source Engine.","archived":false,"fork":false,"pushed_at":"2024-04-01T07:28:26.000Z","size":61,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T20:17:36.212Z","etag":null,"topics":["minecraft","rcon-client","source-engine"],"latest_commit_sha":null,"homepage":"https://developer.valvesoftware.com/wiki/Source_RCON_Protocol","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viral32111.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-28T22:32:01.000Z","updated_at":"2022-11-11T23:08:54.000Z","dependencies_parsed_at":"2024-01-01T09:34:15.861Z","dependency_job_id":null,"html_url":"https://github.com/viral32111/rcon","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Frcon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Frcon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Frcon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Frcon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viral32111","download_url":"https://codeload.github.com/viral32111/rcon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266475,"owners_count":20910831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minecraft","rcon-client","source-engine"],"created_at":"2024-11-05T11:32:05.643Z","updated_at":"2025-04-04T23:31:07.527Z","avatar_url":"https://github.com/viral32111.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RCON\n\n[![CI](https://github.com/viral32111/rcon/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/viral32111/rcon/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/viral32111/rcon/actions/workflows/codeql.yml/badge.svg)](https://github.com/viral32111/rcon/actions/workflows/codeql.yml)\n![GitHub tag (with filter)](https://img.shields.io/github/v/tag/viral32111/rcon?label=Latest)\n![GitHub repository size](https://img.shields.io/github/repo-size/viral32111/rcon?label=Size)\n![GitHub release downloads](https://img.shields.io/github/downloads/viral32111/rcon/total?label=Downloads)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/viral32111/rcon?label=Commits)\n\nThis is a command-line RCON (remote console) client for [Minecraft](https://minecraft.net) and the [Source Engine](https://wikipedia.org/wiki/Source_(game_engine)).\n\n## 📜 Background\n\nI host game servers for my community and friends, thus I require a reliable way to remotely control them over command-line on the host server. There are many tools available to do this already, such as [mcrcon](https://github.com/Tiiffi/mcrcon) which served as an inspiration for this project. However, once I started needing one for the Source Engine too, I felt I should make my own as I did not want to be different multiple utilities for each game.\n\nI decided to create this project in Go as it is perfect for small single-executable utilities that need to work across a variety of platforms. Go has a vast standard library too, eliminating the hastle of downloading and importing third-party libraries.\n\n## 📥 Usage\n\nDownload the [latest release](https://github.com/viral32111/rcon/releases/latest) for your platform. There are builds available for Linux and Windows, on 32-bit and 64-bit architectures of x86 and ARM. There are extra Linux builds to accommodate glibc and musl libraries. This should cover the majority of use cases.\n\nThe utility expects, at minimum, a protocol and command to be provided. The server's IP address, password, and more, can be specified using optional flags. The server response is displayed as the output, so long as the connection and authentication was successful.\n\nEach argument will be treated as a separate command, so wrap commands in quotation that contain spaces. For example, `\"sv_cheats 1\"` would be considered a single command but `sv_cheats 1` would be considered as two commands.\n\n### ⚙️ Flags\n\nThere are different protocols implemented. Exactly one must be chosen via a flag:\n\n* `--minecraft` to use the [Minecraft protocol](https://wiki.vg/RCON) and set the default port to `25575`.\n* `--sourceengine` to use the [Source Engine protocol](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol) and set the default port to `27015`.\n\nThere are additional optional flags for fine-tuning functionality:\n\n* `--address \u003cstring\u003e`: The remote server's IPv4 address. Defaults to `127.0.0.1`.\n* `--port \u003cnumber\u003e`: The remote server's port number. Defaults to the selected protocol's default.\n* `--password \u003cstring\u003e`: The remote console password. Defaults to nothing.\n* `--interval \u003cnumber\u003e`: The time to wait in seconds between sending commands, only useful when multiple commands are specified. Defaults to `1`.\n\nThese flags can be prefixed with either a single (`-`) or double (`--`) hyphen.\n\nThe flags can be provided in any order, but the arguments (the commands to execute) must come last.\n\nUse the `--help` (`-h`) flag for more information.\n\n## 🖼️ Examples\n\nViewing the status of a Garry's Mod server at `192.168.0.5` using the default port `27015`:\n\n```\n$ rcon -sourceengine -address 192.168.0.5 -password verySecurePassword123 status\nhostname: Example Server\nversion : 2022.06.08/24 8606 insecure\nudp/ip  : 192.168.0.5:27015\nmap     : gm_construct at: 0 x, 0 y, 0 z\nplayers : 0 (10 max)\n\n# userid name                uniqueid            connected ping loss state  adr\n```\n\nEnabling cheats on a Team Fortress 2 server at `127.0.0.1` using the custom port `27020`:\n\n```\n$ rcon -sourceengine -port 27020 -password superRealPassword567 sv_cheats 1\nL 07/29/2022 - 20:59:32: server_cvar: \"sv_cheats\" \"1\"\n```\n\nBanning an IP address on a Team Fortress 2 server at `127.0.0.1` using the default port `27015`:\n\n```\n$ rcon --password aw3s0meP4ssw0rd --sourceengine addip 60 192.168.0.100\nL 07/29/2022 - 21:00:54: Addip: \"\u003c\u003e\u003c\u003e\u003c\u003e\" was banned by IP \"for 60.00 minutes\" by \"Console\" (IP \"192.168.0.100\")\n```\n\nListing online players on a Minecraft server at `192.168.0.10` using the default port `25575`:\n\n```\n$ rcon -address 192.168.0.10 -minecraft -password reallyG00dPassword list\nThere are 0 of a max of 20 players online:\n```\n\n## ⚖️ License\n\nCopyright (C) 2022-2023 [viral32111](https://viral32111.com).\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as\npublished by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program. If not, see https://www.gnu.org/licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviral32111%2Frcon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviral32111%2Frcon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviral32111%2Frcon/lists"}