2.6 KiB
mctl
mctl is a terminal-friendly remote console client
Index
Installation
Install mctl using golang
go install code.jakeyoungdev.com/jake/mctl@main
Use
Configuring mctl
mctl requires a one-time setup via the 'init' command before using any other commands
mctl init
Add a server
To communicate with servers, they must be first added to the server list
mctl server add
Server alias: home
Server address: x.x.x.x
Server port: 61695
Password:
Activating a server
Servers can be activated to be used as the default server for mctl operations, the server alias must be provided to activate it
mctl server activate <name>
Login to server
To login to the activated server and start sending commands
mctl login
The -s flag can be set to login to a non-activated server
mctl login -s <name>
Savind a command
Commands can be saved to be run later
mctl command add
Command alias: seed
Command: seed
The command saved can then be run with the following command, this will run the 'seed' command on the activated server, or a different server using the -s flag
mctl command run seed
Commands can contain placeholders to be filled in at runtime
#created the 'placeholder' command which runs the 'kill' command
mctl command add
Command alias: placeholder
Command: kill %s
#runs the 'kill' command on 'player'
mctl command run placeholder kill player
Running the placeholder command with the arg 'player' will run 'kill player' on the server
Clearing database
The mctl database can be cleared with the destoy command. WARNING, this command will delete any saved servers or commands completely resetting mctl
mctl destroy
CRUD Commands
Other create, read, update, and delete versions of subcommands are available. Use the -h flag for more information
Security
RCon is an inherently insecure protocol, passwords are sent in plaintext and, if possible, the port should not be exposed to the internet. It is best to keep these connections local or over a VPN.
mctl utilizes govulncheck and gosec in workflows to ensure quality, secure code is being pushed. These workflow steps must pass before a PR will be accepted
Development
this repo is currently in development and may encounter breaking changes, use a tag to prevent any surprises