Skip to content

Commit 6e89327

Browse files
committed
release 0.3.0
1 parent 22108f3 commit 6e89327

6 files changed

Lines changed: 208 additions & 80 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.idea/
2-
rcon.yaml
2+
rcon-local.yaml
33
rcon-cli
44
rcon-cli.exe
55
build.sh
66
vendor/
77
Gopkg.lock
88
release/
9+
*.log

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rcon-cli
22
[![Go Report Card](https://goreportcard.com/badge/github.com/gorcon/rcon-cli)](https://goreportcard.com/report/github.com/gorcon/rcon-cli)
3-
![GitHub All Releases](https://img.shields.io/github/downloads/gorcon/rcon-cli/total)
3+
[![GitHub All Releases](https://img.shields.io/github/downloads/gorcon/rcon-cli/total)](https://github.com/gorcon/rcon-cli/releases)
44

55
CLI for executing queries on a remote server
66

@@ -15,7 +15,9 @@ Open pull request if you have successfully used a package with another game with
1515

1616
## Installation
1717

18-
Download the binary for your platform from the [releases](https://github.com/gorcon/rcon-cli/releases)
18+
Download the binary for your platform from the [latest releases](https://github.com/gorcon/rcon-cli/releases/latest)
19+
20+
See [Changelog](changelog.md) for release details
1921

2022
## Usage
2123

@@ -24,7 +26,6 @@ USAGE:
2426
rcon-cli [global options] command [command options] [arguments...]
2527
2628
COMMANDS:
27-
cli Run CLI for commands in the form of successive lines of text from the input stream
2829
help, h Shows a list of commands or help for one command
2930
3031
GLOBAL OPTIONS:
@@ -33,8 +34,10 @@ GLOBAL OPTIONS:
3334
--password value, -p value set password to remote rcon server
3435
can be set in the config file rcon.yaml
3536
--command value, -c value command to execute on remote server. Required flag to run in single mode
36-
--env value, -e value allows to select remote server address and password from the environment
37+
--env value, -e value allows to select remote server address and password from the environment
3738
in the configuration file
39+
--cfg value allows to specify the path and name of the configuration file. The default
40+
value is rcon.yaml. If not defined config is taken from the running directory.
3841
--help, -h show help
3942
--version, -v print the version
4043
```
@@ -47,16 +50,15 @@ Server address, password and command to server must be specified in flags at sta
4750

4851
./rcon -a 127.0.0.1:16260 -p mypassword -c help
4952

50-
If flags are passed into the CLI, then the flags are sent as a single command.
51-
The response is displayed, and the CLI will exit.
53+
If arguments are passed they will sent as a single command. The response will displayed, and the CLI will exit.
5254

53-
### Input stream mode
55+
### Interactive input stream mode
5456

55-
To run CLI in input stream mode add command cli. Example:
57+
To run CLI in interactive mode run `rcon` without `-c` argument. Example:
5658

57-
./rcon -a 127.0.0.1:16260 -p mypassword cli
59+
./rcon -a 127.0.0.1:16260 -p mypassword
5860

59-
Use `^C` to terminate or type command `:q` in CLI to exit.
61+
Use `^C` to terminate or type command `:q` to exit.
6062

6163
## Configuration file
6264

@@ -66,19 +68,25 @@ and in it the default block is filled, then at startup the -a and -p flags can b
6668

6769
./rcon -a 127.0.0.1:16260 -c players
6870
./rcon -c status
69-
./rcon -p mypassword cli
70-
./rcon cli
71+
./rcon -p mypassword
72+
./rcon
7173

7274
Default configuration file name is `rcon.yaml`. File must be saved in yaml format. It is also possible
73-
to set the environment name and connection parameters for each server, for example:
75+
to set the environment name and connection parameters for each server. You can enable logging requests
76+
and responses. To do this, you need to define the log variable in the environment blocks. You can do
77+
this for each server separately and create different log files for them. If the path to the log file is
78+
not specified, then logging will not be conducted. You cannot control this in arguments, it is available
79+
only from the configuration file.
7480

7581
```yaml
7682
default:
7783
address: "127.0.0.1:16260"
7884
password: "password"
85+
log: "rcon-default.log"
7986
zomboid:
8087
address: "127.0.0.1:16260"
8188
password: "password"
89+
log: "rcon-zomboid.log"
8290
rust:
8391
address: "127.0.0.1:28003"
8492
password: "password"
@@ -87,4 +95,8 @@ rust:
8795
You can choose the environment at the start:
8896
8997
./rcon -e rust -c status
90-
./rcon -e zomboid cli
98+
./rcon -e zomboid
99+
100+
And set custom config file
101+
102+
./rcon --cfg /path/to/config/file.yaml

changelog.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
5+
## [v0.3.0] - 2019-07-28
6+
### Added
7+
- Print error messages for missed address and password arguments.
8+
- Added argument `--cfg` to pass custom config path/name.
9+
- Check of parameters of authorization of a remote server before launching interactive mode.
10+
- Added rcon.yaml as config sample.
11+
- Added log variable to config file that enables logs for requests and responses for remote server.
12+
13+
### Removed
14+
- Remove rcon-upx fron release.
15+
- Remove 'cli' command to run in interactive mode. For use interactive mode run `rcon` without `-c` argument.
16+
17+
18+
## [v0.2.0] - 2019-07-27
19+
### Added
20+
- Added environments to config.
21+
22+
### Fixed
23+
- Fix global options in interactive mode.

0 commit comments

Comments
 (0)