From 7f090dbce7e528e8517a628f06c24e940617b4c7 Mon Sep 17 00:00:00 2001 From: jake Date: Thu, 17 Apr 2025 11:37:37 -0400 Subject: [PATCH] update readme and version bump --- README.md | 40 +++++++++++++++++++++++++++++++++++++--- cmd/root.go | 2 +- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4f88f4d..39564fd 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Install mctl using golang ```bash go install code.jakeyoungdev.com/jake/mctl@main #it is recommended to use a tagged version ``` +
## Setup ### Configuring mctl @@ -31,12 +32,48 @@ RCON@X.X.X.X /> list There are 0 of a max of 20 players online: ``` +### Saving commands +Commands can be saved under an alias for quick execution later, saved commands can contain placeholders '%s' that can be populated at runtime to allow for commands with unique runtime args to still be saved: +```bash +mctl save +``` + +### Viewing commands +Saved commands can be viewed with: +```bash +mctl view +``` + +### Running saved commands +Commands that have been saved can be run with: +```bash +mctl run +``` +If the saved command contains placeholders, the necessary arguments must be supplied: +```bash +mctl run args... +``` + +### Saving and running example +```bash +#saving command named "test" to run "tp %s 0 0 0" +mctl save test +Command: tp %s 0 0 0 + +#run command on user "jake" +mctl run test jake +#will run: tp jake 0 0 0 on remote server +``` + ## Documentation ### Commands |Command|Description| |---|---| |config|used to update the config file| |login|makes connection request to the server using saved configuration and enters command loop| +|save \|saves specific command for reuse| +|view \|displays saved command| +|run \ args...|runs saved command filling placeholders with supplied args| ### Flags #### config @@ -45,9 +82,6 @@ There are 0 of a max of 20 players online: |port|p|yes|RCon port| |server|s|yes|RCon address| -#### login -no flags - ### Configuration file All configuration data will be kept in /home/.mctl.yaml or C:\\Users\\username\\.mctl.yaml, passwords are encrypted for an added layer of security diff --git a/cmd/root.go b/cmd/root.go index 4e1173c..fa5d4f3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -14,7 +14,7 @@ var rootCmd = &cobra.Command{ Use: "mctl", Short: "A remote console client", Long: `mctl is a terminal-friendly remote console client made to manage game servers.`, - Version: "v0.1.1", + Version: "v0.2.0", // Run: func(cmd *cobra.Command, args []string) { }, }