goto
An interactive command-line tool to manage your environments
Overview
You always need to login to some Linux machine or connect to a MySQL instance. Or you have some directories/environments that you often want to change to.
You can write a script, or create an alias to a sequence of commands, but you just don't want to remember those aliases!
I have many machines to connect to, and I always forget the name of them, so I have to check my script each time!
Let's do something! When you type goto
, it gives you a list of commands to run, and you can search by the name! You don't need to remember any machine names or aliases!
Install
brew install LucienZhang/tap/goto-cli
Config
You need to config your commands in file ~/.goto/.goto.yaml
Shell: bash # (Optional, the shell to run your command, default to bash)
StartInSearchMode: true # (Optional, default to false, whether start in search mode. press slash (/) to toggle between search mode and normal mode)
Commands:
- Name: command 1
Desc: A command that just print hello # (Optional)
Color: 244;130;37 # (Optional, this is the RGB color code of your command name. It has to be in form of
;
;
)
Cmd: echo hello # The real command to run
- Name: ls goto config file
Cmd: ls ~/.goto/.goto.yaml
Then you have this!