bercon-cli¶
Command-line client for servers using BattlEye RCon.
Server profiles¶
Use [globals] for shared values and [profile.NAME] for each server.
Select profiles with --profile NAME and config files with --config PATH.
When --config/-c is omitted, search these paths in order:
Linux / BSD¶
- If
$XDG_CONFIG_HOMEis set, use$XDG_CONFIG_HOME/bercon-cli/config.ini; otherwise, use~/.config/bercon-cli/config.ini. ~/.bercon-cli.ini
macOS¶
~/Library/Application Support/bercon-cli/config.ini- If
$XDG_CONFIG_HOMEis set, use$XDG_CONFIG_HOME/bercon-cli/config.ini; otherwise, use~/.config/bercon-cli/config.ini. ~/.bercon-cli.ini
Windows¶
- If
%APPDATA%is set, use%APPDATA%\bercon-cli\config.ini. - If
%XDG_CONFIG_HOME%is set, use%XDG_CONFIG_HOME%\bercon-cli\config.ini; otherwise, use%USERPROFILE%\.config\bercon-cli\config.ini. %USERPROFILE%\.bercon-cli.ini
Configuration priority¶
Parameter priority, lowest to highest:
- Built-in default values
- Variables loaded from the
.envfile - Environment variables set in your shell or service
- Shared settings in the INI configuration file (
[globals]section) - Settings in the selected server profile in that INI file
- Connection settings from the BattlEye config
- Command-line flags
NAME¶
bercon-cli
SYNOPSIS¶
bercon-cli [OPTIONS]
OPTIONS¶
Connection¶
| Option | Description | Default | Environment | Required |
|---|---|---|---|---|
-i, --ip |
RCon server IP address or hostname | 127.0.0.1 |
$BERCON_ADDRESS |
no |
-P, --password |
BattlEye RCon password | $BERCON_PASSWORD |
no | |
-p, --port |
BattlEye RCon server port | 2305 |
$BERCON_PORT |
no |
-t, --timeout |
Timeout for login and command responses | 3s |
$BERCON_TIMEOUT |
no |
-a, --attempts |
Number of login attempts | 1 |
$BERCON_ATTEMPTS |
no |
-k, --keepalive |
Keepalive interval (<45s; 0 disables) | 30s |
$BERCON_KEEPALIVE |
no |
-b, --buffer-size |
Reserved option (deprecated: ignored) | $BERCON_BUFFER_SIZE |
no |
Output¶
| Option | Description | Default | Environment | Required |
|---|---|---|---|---|
-f, --format |
Output format; choices: table, json, raw, md, html, csv |
table |
$BERCON_FORMAT |
no |
Profile and config¶
| Option | Description | Environment | Required |
|---|---|---|---|
-n, --profile |
Select a profile from the INI config file | $BERCON_PROFILE |
no |
-c, --config |
Read connection settings from this INI file | $BERCON_CONFIG |
no |
-r, --server-cfg |
Read RCon settings from a BattlEye config | no | |
-l, --list-profiles |
List profiles and exit | no | |
-e, --example |
Print an example INI profile and exit | no |
GeoIP¶
| Option | Description | Environment | Required |
|---|---|---|---|
-g, --geo-db |
Path to the GeoIP MMDB file | $BERCON_GEO_DB |
no |
-G, --geo-db-url |
HTTPS URL for downloading or updating the GeoIP database | $BERCON_GEO_DB_URL |
no |
--geo-db-url-auth |
MaxMind account ID and license key | $BERCON_GEO_DB_URL_AUTH |
no |
Env Options¶
| Option | Description | Default | Required |
|---|---|---|---|
--env-file FILE |
Path to .env file | .env |
no |
--no-env |
Disable .env file loading | no | |
--env-override |
Override existing environment variables from .env file | no |
Help Options¶
| Option | Description | Required |
|---|---|---|
-h, --help |
Show this help message | no |
-v, --version |
Show version information | no |
COMMANDS¶
Help Commands
help¶
Show help
Usage: bercon-cli [OPTIONS] help
version¶
Show version information
Usage: bercon-cli [OPTIONS] version [version-OPTIONS]
Show version information¶
| Option | Description | Required |
|---|---|---|
--short |
Print version number only | no |
--commit |
Print commit SHA only | no |
--json |
Print version information as JSON | no |
completion¶
Generate shell completion
Usage: bercon-cli [OPTIONS] completion [completion-OPTIONS]
Generate shell completion¶
| Option | Description | Required |
|---|---|---|
--shell |
Shell completion format; choices: bash, zsh, pwsh |
no |
Arguments¶
| Name | Description | Required |
|---|---|---|
output |
Output file path | no |
exec¶
Execute RCon commands
Usage: bercon-cli [OPTIONS] exec [exec-OPTIONS]
Examples¶
Connect directly to a server
Run a command against a saved profile
Pass a command with spaces to the server
Execute RCon commands¶
| Option | Description | Default | Environment | Required |
|---|---|---|---|---|
-x, --repeat |
Batches to run (-1 repeats forever) | 1 |
$BERCON_REPEAT |
no |
-s, --cmd-sleep |
Delay between commands | 1ms |
$BERCON_SLEEP_CMD |
no |
-S, --loop-sleep |
Delay between batches | 5s |
$BERCON_SLEEP_LOOP |
no |
shell¶
Start an interactive RCon session
Usage: bercon-cli [OPTIONS] shell [shell-OPTIONS]
Examples¶
Start an interactive RCon session¶
| Option | Description | Environment | Required |
|---|---|---|---|
--no-builtins |
Send CLI built-in commands such as exit and quit to the server | $BERCON_NO_BUILTINS |
no |
watch¶
Read server messages
Usage: bercon-cli [OPTIONS] watch [watch-OPTIONS]
Examples¶
Read server messages¶
| Option | Description | Environment | Required |
|---|---|---|---|
--timestamps |
Prefix server messages with local timestamps (RFC 3339) | $BERCON_TIMESTAMPS |
no |
SEE ALSO¶
- https://github.com/woozymasta/bercon-cli