This project aims to help in the following scenarios
You are a developer and you have long commands that you repeated type, and you need a easier way to compose the commands.
You are a developer and you are often asked to help analysts fix their computer because it requires running a few commands and the analysts are not comfortable dealing with terminals, but of course the command is so simple it's not worth making a UI for it.
Approach
Use Go instead of Node or Python to allow easy installation on Windows.
Pacakge all frontend resources in binary to allow minimal setup.
Group each functional group as a "Menu" which is a defined by a YAML file saved in ~/.kut/menus, e.g.
name: windows-shell
help: Collection of common windows shell commands
actions:
- name: ping
help: Ping a party in network
template: ping {{.host}}
params:
- name: host
help: Host to ping
value: google.com
- name: ip
help: Show my ip adresses
template: ipconfig
The user executes an Action by providing Params, which is rendered into the Template (Go Template) and executed in a shell environment.
The user can view the results of the execution in the frontend.
Web Mode Usage
Installation
Download a distributable zip from Github releases.
Unzip the package and move the executables to a place where they can be executed.
Ingesting Menu
Run kutd or kutd.exe or create a shortcut to run. This is the web server and message exchange server and it needs to keep running.
A predefined number of Channels are created in the web server (Master), a command runner (Executor) can connect to a channel to create an execution environment to run commands.
Run kut or kut.exe in the desired working directory with arguments to claim a Channel with a Menu name and default Channel 0, e.g.
kut start --menu linux-shell
On Windows, this is best done by creating a shortcut to kutd.exe on the Desktop, then editing the properties to specify a desired starting directory and arguments. Name the shortcut properly and use a lot of them.
kut is built with github.com/urfave/cli and help is available with
kut -h
This needs to keep running for Actions to execute.