rcon-cli-0.1.1 is not a library.
rcon-cli
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.
Installation
Homebrew (macOS/Linux)
Cargo (crates.io)
From Source
Features
- 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
Usage
Configuration File
Store server credentials in a JSON config file to avoid typing them repeatedly.
Example Config File
Create a file (e.g., ~/.rcon-config.json):
Set Environment Variable
Point to your config file:
Using Configs
This loads the host and password from your config file, so you don't need to pass --address or --password flags.
Interactive Mode
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>
Example:
One-Shot Mode
Execute a single command and exit:
Example: