A little RCON cli based on james4k's RCON library for golang.
-
Download the appropriate binary for your platform from the latest releases
-
On UNIX-y platforms, set the binary to be executable - done!
If you have Go you could also simply go get github.com/itzg/rcon-cli && rcon-cli -h
.
rcon-cli is a CLI for attaching to an RCON enabled game server, such as Minecraft.
Without any additional arguments, the CLI will start an interactive session with
the RCON server.
If arguments are passed into the CLI, then the arguments are sent
as a single command (joined by spaces), the response is displayed,
and the CLI will exit.
Usage:
rcon-cli [flags] [RCON command ...]
Examples:
rcon-cli --host mc1 --port 25575
rcon-cli --port 25575 stop
RCON_PORT=25575 rcon-cli stop
Flags:
--config string config file (default is $HOME/.rcon-cli.yaml)
--host string RCON server's hostname (default "localhost")
--password string RCON server's password
--port int Server's RCON port (default 27015)
You can preconfigure rcon-cli to use the arguments you want by default by modifying the file .rcon-cli.yaml
in your home folder. If you want to use any other file use the argument --config /path/to/the/config.yaml
.
Example of a .rcon-cli.yaml
file:
host: mydomain.com
port: 12345
password: mycustompassword
That way executing rcon-cli
without arguments would connect to mydomain.com:12345
with the password mycustompassword
by default.