A command-line RCON client for remote server administration.
This client was developed with Factorio in mind, but may work with other RCON-compatible games.
brew tap connor-hanson/rcon-cli
brew install rcon-clicargo install rcon-clicargo install --path .- Interactive Mode - Connect once and run multiple commands in a persistent session
- One-Shot Mode - Execute single commands and exit
- Config File Support - Store server credentials in a JSON file for easy access
- Lightweight - Minimal dependencies and fast execution
- Cross-Platform - Works on macOS, Linux, and Windows
Connect to a server and run commands interactively:
> rcon-cli
Enter address: <your_server_address>:<your_server_port>
Enter password: <your_server_password>
[2026-02-14T01:13:27Z INFO rcon_cli] Connected!
> <enter command>
rcon-cli --address <ip_addr> --port <port> --password <password> --show-responsesExample:
rcon-cli --address 127.0.0.1 --port 27015 --password mypasswordExecute a single command and exit:
rcon-cli --address <ip_addr> --port <port> --password <password> -c <command>Example:
rcon-cli --address 127.0.0.1 --port 27015 --password mypassword -c "/players"Store server credentials in a JSON config file to avoid typing them repeatedly.
Create a file (e.g., ~/.rcon-config.json):
{
"configs": {
"production": {
"host": "192.168.1.100:27015",
"password": "prod_password"
},
"staging": {
"host": "192.168.1.101:27015",
"password": "staging_password"
},
"local": {
"host": "127.0.0.1:27015",
"password": "dev_password"
}
}
}Point to your config file:
export RCON_CONFIG_PATH=~/.rcon-config.jsonrcon-cli --config-name custom_config_profileThis loads the host and password from your config file, so you don't need to pass --address or --password flags.
If the client is behaving unexpectedly, you can prefix RUST_LOG="DEBUG" to any command which runs this client
> RUST_LOG="DEBUG" rcon-cli