msu is a Bash framework promoting modularity and minimality in the command line. One of the major purposes of such a framework is to reduce time (and code) taken to write bash scripts. Since most scripts you will write may have a very short shell life (and I’m a lazy programmer), it is most likely horrifying to have to write and re-write common functions, such as console logging functions, etc.

This will be a quick rundown on how msu works. Read the docs for more in-depth information

It is assumed that you have msu installed

modules

msu revolves around this concept of modules

A module can be seen as a collection of reusable Bash script(s). A module would contain some functions that you want to reuse from script to script. Most modules are aligned towards a narrow goal, such as transfer for file transfers and fancy-aliases for (of course) fancy aliases.

Since we always want to manage our modules, maybe put it up on Github or something, msu always you to install modules from either Github or BitBucket. Yes, you module can be in a private repository. However, only git repositories are supported.

Lets install the module proverb for some Programmer proverbs:

msu has a useful alias, msu.reload, for reloading aliases in times like this. So you do not need to restart your terminal, for proverb to be available.

msu always ships with some internal modules, which are minimal but powerful. They include formatting and console logging modules.

scripting

Here is an example of a simple script using some logging functions from the internal module console:

Now let’s make it executable and run it:

The output will be colored appropriately. Other functions in the console module include interactively asking for user input and passwords. Read the man-pages for documentation on the functions.

goodies

There are modules I use frequently. I have placed them in a file:

I just move with this file from machine to machine. To install my modules, I just use the above file with the sub-command install-many. See demo below

Since you might be interacting with many machines, you may want to install msu and some modules in a remote machine, then purge them after you are done. There is a sub-command for that: nuke. See demo below

Now, upgrading! Upgrading most things can be a bitch! But not with msu. The sub-command upgrade is made for just this purpose. It upgrades your installation to the latest release.

showcase

A showcase of modules is actively maintained here. If you want to share your module with other terminal freaks, just send a PR with its info appended to the markdown file.

bye

msu is still a baby! More code (and coffee, especially) is needed to achieve production-grade status. Why don’t you head over to the Github project page and fork!

Terminal: Get Freaky!