Go to file
Augusto Dwenger J. 9db0f9f923
Refactor cmd execution function chain to be more readable
The execution was originaly build to be used as a lib, but this is no
longer the case and so I removed all the `io.Writer` and `io.Reader`
interactions. The app reads now from Stdin and writes to Stdout as it
did before.
It also redoes the error handling so that all errors that are not
treated are being handled in the `main` function.
2022-02-03 00:27:16 +01:00
.gitignore Add arm64 support 2019-05-05 09:21:06 -05:00
Dockerfile Add build stage to the docker image build 2021-03-08 00:26:53 +01:00
go.mod Replace james4k/rcon with hamburghamer/rcon 2021-03-08 16:44:58 +01:00
go.sum Replace james4k/rcon with hamburghamer/rcon 2021-03-08 16:44:58 +01:00
LICENSE Add copyright holder to the license file 2021-03-07 23:51:58 +01:00
main.go Refactor cmd execution function chain to be more readable 2022-02-03 00:27:16 +01:00
README.md Remove old project badges 2021-03-09 00:56:25 +01:00

rcon-cli

A little RCON cli written in golang.

This is a fork from itzg/rcon-cli with following extra features:

  • Provied a smaller binary (ca. 50% smaller).
  • Replace base RCON lib from james4k/rcon with hamburghammer/rcon.
  • Remove config.yml support.
  • Change the Dockerfile to have build support.

Installation

From Source

Clone the repository and install it with go install (requires working go installation)

Docker/Podman

Clone the repository and use docker/podman to build a image with the executable docker build -t hamburghammer/rcon-cli . Start the image docker run hamburghammer/rcon-cli -h

Usage

rcon-cli is a CLI to interact with a RCON server.
It can be run in an interactive mode or to execute a single command.

USAGE:
	rcon-cli [FLAGS] [RCON command ...]
	
FLAGS:
  -h, --help              Prints this help message and exits.
      --host string       RCON server's hostname. (default "localhost")
      --password string   RCON server's password.
      --port string       RCON server's port. (default "25575")

ENVIRONMENT VARIABLE:
	All flags can be set through the flag name in capslock with the RCON_CLI_ prefix (see examples).
	Flags have allways priority over env vars!

EXAMPLES:
	rcon-cli --host 127.0.0.1 --port 25575
	rcon-cli --password admin123 stop
	RCON_CLI_PORT=25575 rcon-cli stop