A basic cmdline program for Linux to help me do basic things I should already know. Ex: "AAH drive mount"
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


AAH, or the Annoyingly Advanced Helper, is a basic command-line program to help me do basic things I should already know.


For example:

~$ AAH drive mount
mount: 		mkdir /mnt/disk && mount <device> /mnt/disk


Installation is fairly simple. You can either install from source or use the prebuilt binary. Both are fairly simple.

Prebuilt Binary

Downloading a prebuilt binary is fairly simple. Simply choose a file from the releases page and run the commands below, replacing the information in brackets with their respective values.

wget https://github.com/fennifith/AAH/releases/download/{version}/AAH-{platform}
mv AAH-{platform} AAH
chmod +x AAH

You can now run ./AAH to check that the it works. If you would like to run the program without having to remember the directory that it is stored in, you can either add its directory to the $PATH environment variable or move the file to somewhere that is in your $PATH.

Moving to Somewhere in $PATH

sudo su
mv AAH /bin/AAH


Adding Directory to $PATH

This assumes that you have downloaded the binary to a folder titled ~/bin. Feel free to change the directory as you wish.

Add the following line to the bottom of ~/.bashrc:

export PATH="$PATH:~/bin"

Then run source ~/.bashrc. Finally, run AAH to check that it works.




If you have go set up already, you can skip this. It is basically just a simplified version of the instructions on golang's website.

Follow the link above for instructions to download and install the go binary. After installing go, you can either keep following these instructions or follow the installation instructions linked on the download page. Either way, you will end up with a similar result.

Next, you will want to create a "workspace" for your go projects. In this instructions, I will be creating the workspace at ~/go, but feel free to change this directory to your liking.

mkdir go && cd go
mkdir {bin,src,pkg}

Now that go's fancy "workspace" directory has been created, it needs to be added as an environment variable. Go ahead and add the following to the end of ~/.bashrc...

export GOPATH="/home/<you sir>/go"
export PATH="$PATH:$GOPATH/bin"

After saving the file, run source ~/.bashrc and you're good to go.


This bit is fairly simple.

go get github.com/fennifith/AAH
cd ~/go/src/github.com/fennifith/AAH
go get && go build && go install

After this, you can try running AAH to check that it has installed properly.


Configuration is fairly basic. The program will use the aahelp.yaml file in the repository by default. You can override the values in this file or add your own by creating another located at ~/.aahelp.yaml.

The file uses basic YAML syntax (which can be easily learnt by just taking a glance at the default file in the repository), though it should be noted that there is no support for arrays as they do not make much sense in this context.

The program takes any number of arguments, allowing you to create as many nested maps as you would like and type either some or all of the keys as arguments when running the command to access their values.

For example, with the following file:

            stuff: this is a thing

You could type AAH thing something yes stuff to get the value this is a thing. Alternatively, you could just type AAH thing something yes to get a list of everything below the key yes in the YAML hierarchy. And if you are very lazy, you can even shorten some of the names provided they are still differentiable from the other keys, ex: AAH th some y.


See this project's CONTRIBUTING.md for instructions on how to contribute to this project.