WTF (aka ‘wtfutil’) is a free and open-source personal information dashboard for your terminal, providing at-a-glance access to your very important but infrequently-needed stats and data. Some of the stats that wtfutil provides include your OpsGenie schedules, Google Calendar, Git and GitHub repositories, and New Relic deployments. You can also be able to see who’s away in BambooHR, which Jira tickets are assigned to you, what time it is in France, and dozens more.
What makes all this possible is modules which are the heart of WTF. A module is a discrete unit of functionality that extracts data from some source and packages that data for display. For example, the New Relic module uses New Relic’s API to retrieve a list of the latest deployments and packages that information as a list for display in the “New Relic” widget. For your information, WTF comes with over 50 easily-configurable built-in modules. See below for just a few of them.
- New Relic
- Azure DevOps
- Crypto Currencies
- DEV (dev.to)
To utilize this tool, let us go ahead and install it so that we can explore what it can do for us.
Installing as Binary
WTFutil can be installed from the binary files. To get it setup this way, download the latest binary from their GitHub releases space. You must have wget or curl installed in case you do not have one.
Install curl command line tool:
#####Install curl on Ubuntu/Debian##### sudo apt install curl -y #####Install curl CentOS##### sudo yum install curl -y
Fetch latest wtfutil binary file:
curl -s https://api.github.com/repos/wtfutil/wtf/releases/latest|grep browser_download_url|grep linux_amd64|cut -d '"' -f 4|wget -i -
Extract the file downloaded:
tar xvzf wtf_*_linux_amd64.tar.gz
TMove to /usr/local/bin/ and rename
sudo mv wtf_*_linux_amd64/wtfutil /usr/local/bin/
Make the files executable:
sudo chmod a+x /usr/local/bin/wtfutil
You can then launch wtfutil:
And you should see a terminal dashboard as shown below:
Running via Docker
In case you are a container fanatic, there is an option for you to run wtfutil inside a docker container as follows:
Download or create a Dockerfile:
curl -o Dockerfile https://raw.githubusercontent.com/wtfutil/wtf/master/Dockerfile
The Dockerfile contents looks like below.
FROM golang:1.13-alpine as build ARG version=master RUN apk add git make ncurses && \ git clone https://github.com/wtfutil/wtf.git $GOPATH/src/github.com/wtfutil/wtf && \ cd $GOPATH/src/github.com/wtfutil/wtf && \ git checkout $version ENV GOPROXY=https://proxy.golang.org,direct ENV GO111MODULE=on ENV GOSUMDB=off WORKDIR $GOPATH/src/github.com/wtfutil/wtf ENV PATH=$PATH:./bin RUN make build FROM alpine COPY --from=build /go/src/github.com/wtfutil/wtf/bin/wtfutil /usr/local/bin/ RUN adduser -h /config -DG users -u 20000 wtf USER wtf ENTRYPOINT ["wtfutil"]
Build the docker container. This will take some time to complete:
$ docker build -t wtfutil .
If you are interested in a particular tag or branch:
$ docker build --build-arg=version=v0.25.0 -t wtfutil .
After the build is done, you can run the container:
$ docker run -it wtfutil
To run the container with a local config file use the following command.
$ docker run -it -v path/to/config.yml:/config/config.yml wtfutil --config=/config/config.yml
When you first run the container, you should see a rudimentary terminal dashboard as shown below:
Installation on macOS
On macOS you can use Homebrew, MacPorts or Binary method:
###Homebrew### brew tap wtfutil/wtfutil brew install wtfutil wtfutil ###MacPorts### sudo port selfupdate sudo port install wtfutil wtfutil
Configuration of wtfutil
WTF configuration files are located in
$HOME/.config/wtf/config.yml. In the file, you can change a lot of settings depending on what you wish to achieve.
In order to add modules, all you need to do is to edit $HOME/.config/wtf/config.yml file by adding the various modules that you can find in wtfutils’ documentation. As an example, in order to add the Docker module, we will add its configuration to the bottom of the file under “mods:” as follows:
$ vim $HOME/.config/wtf/config.yml uptime: args: [""] cmd: "uptime" enabled: true position: top: 3 left: 1 height: 1 width: 2 refreshInterval: 30 type: cmdrunner ####ADDED DOCKER CONFIGS#### docker: type: docker enabled: true labelColor: lightblue position: top: 0 left: 0 height: 3 width: 3 refreshInterval: 1
The configuration file is yaml, so make sure the spacing is done accordingly. Launching wtfutil again should show you Docker related settings and configuration details as shown on the screenshot below:
wtfutil is a highly extensible. All you need are the API details for most of the modules that it supports and an addition of their respective configurations in the config.yml file. You can check your Azure DevOps details, Kubernetes or your BambooHR details and much more from that one interface. For more information about wtfutil including all of the modules that it supports, look at the documentation shared below:
Get the latest release of wtfutil at the official releases GitHub page.