OhMyZsh and Janus: Set Up Productive Work Environment in 10 Minutes or Less

Illustration of a person stretching with an orange scarf, surrounded by stacks of papers and a wall covered in sticky notes, depicting a creative and busy work environment.
Last updated: | Published:
Illustration of a person stretching with an orange scarf, surrounded by stacks of papers and a wall covered in sticky notes, depicting a creative and busy work environment.

In this article I want to show you the toolset that I install on every new workstation.

This is going to be a very subjective recommendation. I just felt I should share the exact steps that I do to get productive in the shortest time possible. I actually don't have any kind of complex setup. I like to keep things as simple as possible.

The configuration I will show you will work on any MacOS, Linux or even Windows WSL systems.

It's really portable and thats another reason I really like this setup.

Zsh Demo

First of all, I have to install couple of packages.

yum install zsh git ruby rubygems-rake vim -y

The tools I am going to show you have just a few dependencies - without them, the installation will fail.

The first tool I always install is OhMyZsh.

OhMyZsh is basically a Zsh bundled with lots of useful plugins and nice color themes.

If you read my other articles, you could see that my terminal always has pretty colors - this is thanks to Zsh.

Installing it is quite easy - you just need run the single command:

> sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Keep in mind, that installing something by blindly downloading a shell script is dangerous.

You have to really trust the source of the script like I do in the case of OhMyZsh.

Terminal screenshot showing package installations and a script cloning "Oh My Zsh" from GitHub. Messages indicate completion and provide instructions for setting up Zsh. ASCII art of "Oh My Zsh" appears with links to social media and merchandise.

As you can see, now my terminal looks much nicer.

I really appreciate all these colors, because I stare at the terminal for a big part of my workday.

Color themes, of course, are just a small part of this bundle.

The really nice part is that it has many different plugins already pre-installed and it's fairly easy to add your own plugins.

Just look at the list of all the plugins included out of the box.

By default only git plugin is enabled, which gives you lots of aliases for different git commands:

Let me clone one of the study projects for mkdev students by using gcl alias.

Terminal screenshot showing installation process of Oh My Zsh, cloning a repository, and unpacking objects. Instructions for setting the default shell are displayed. ASCII art of "oh my zsh" is prominently featured.

Notice that I can see the current branch right here in the terminal.

With this git plugin, I can see the git status by just running gst

Terminal window showing a Git status command on branch master; it indicates the branch is up to date with origin/master, and there is nothing to commit.

or I can see a pretty git log by running glol command.

And I can also use auto-completion to quickly find all the other git commands.

You can quickly add more plugins just by changing your zshrc.

vi ~/.zshrc

Most of the plugins are already installed, we simply need to enable them by updating zshrc file.

You might also have to remove some internal zump files to make completions work.

This is something I encountered with my installation.

jsontools

jsontool plugin allows you to validate json contents and to print them in a human readable form.

For example, here I have a file with european VAT rates which is badly formatted:

Terminal window showing JSON data with country information and VAT rates, including fields like name, code, and periods with rate details.

Now I can just pipe it to pp_json alias and it will give me a pretty output:

Terminal window displaying VAT rates for countries including Belgium, Slovakia, Germany, Portugal, and Austria. Each entry includes the country name, code, effective date, and tax rates such as reduced and standard. The prompt shows the current Git branch as "master".

I can also validate if this json file is in fact a valid JSON.

cat /root/vat.json | is_json

extract

extract plugin is a small time saver when you need to unarchive some tar or zip file.

It's just a bit nicer way to do this kind of thing, mostly because you don't need to memorize individual commands, you can just use the same for different types of archives.

terraform

Finally, I added Terraform plugin to give you another example of useful auto-completions.

With this plugin I can quickly list all the Terraform commands

Screenshot of a terminal displaying Terraform command-line options and descriptions. Commands include init, plan, apply, destroy, and others with brief explanations such as building infrastructure, validating files, and managing workspaces.

and I can also get autocompletition for command line arguments. This is a bit more convenient than just jumping between terraform --help commands and running actual commands.

A terminal window displaying a list of Terraform command options with descriptions, such as `-destroy`, `-input`, and `-out` with details on their usage. The top bar shows the date and time as "27 Mar 18:29" and the terminal tab is labeled "root@mkdev-labs".

Janus

The second and the last tool I want to show you is Janus.

Janus is a Vim distribution, which basically means "Vim with lots of plugins included".

During my career, there were years when I used Vim and periods when I used Sublime Text.

I made a fair attempt at using other editors, like RubyMine, Atom and VisualStudio Code, but none of them really clicked with me.

Many years ago I finally switched back from Sublime Text to Vim and since then never looked back.

And the reason I stayed with Vim ever since was Janus.

My main problem with Vim has always been the need to configure it.

To get the most basic features like a file tree, quick file search, and proper code highlighting I always had to spend way too much time installing plugins amd configuring them to work for and not against me.

I am aware that I could just automate this setup once and never have to repeat it.

But again, as much as I love automation, in this particular case, I never felt like doing it.

I always wanted the simplicity and convenience of Vim bundled with minimal IDE-like features.

Then a colleague of mine recommended me Janus which gave me exactly this.

Same as with OhMyZsh, complete installation is done with a one liner:

curl -L https://bit.ly/janus-bootstrap | bash

I also need to assign leader key to something convenient to me, by changing vimrc file.

You can see here that it was already modified by Janus installation to setup different plugins.

Screenshot of a Vim text editor window displaying a configuration script for Janus, a Vim distribution. The script includes comments and command lines for setting paths, loading plugins, and defining customization settings. The terminal menu is visible at the top.

Let's use the previously downloaded repository for the demo, as it's an actual code repository.

When we start vim, we instantly get NerdTree open, as it's already pre-packaged and configured.

A screenshot of the Vim text editor showing a directory structure on the left. The directories and files listed include 'config/', 'lib/', 'system/', 'Gemfile', 'Gemfile.lock', and 'Rakefile'. The main editing area on the right is blank. The application is running on Linux.

I can hide it with a shortcut and bring it back.

Let me now open some file.

Text editor showing a Ruby Gemfile with a list of gems and their versions, including dry-system, dry-monitor, and dry-transaction. The file manager on the left displays directories and files like config, lib, system, Gemfile, and Rakefile. The terminal status bar at the bottom shows the file path.

You can see that I already have syntax highlighting pre-configured.

I could also change the color theme to something different, but I personally like the default one.

There is also a quick search built in, so when I run ctrl+p I can filter through files and jump to the one I need.

When I modify and save this file, git plugin with highlight the changed lines - you can see the small green cross next to the line number.

A screenshot of a text editor window displaying Ruby code. The left panel shows a directory structure, while the right panel contains code defining a class and methods related to fetching and processing ticker prices. The terminal menu and time are visible at the top.

To see the full diff, I could also run :Gdiff command.

If I type a class name and press tab it will offer me auto-completion for existing classes and methods.

Same as OhMyZsh, Janus has a lot of plugins pre-installed. I personally don't use all of them, but the ones I do use are huge time savers.

Of course, nothing stops me from installing and configuring all of these plugins myself, without Janus. But why would I spend time on it?

Conclusion

And that's everything I wanted to show you today.

As I mentioned, both OhMyZsh and Janus are basically my default setup.

I rarely configure anything extra except installing those two bundles, because they cover 90 to 95% of my needs.

Of course, I always need to install some specific packages and tools, depending on the project I am working on.

But as for the routine daily work of writing the code and using the terminal, I never felt a real need for something more that these utilities provide.

I hope you will find these tools useful or at least give them a try.


Here's the same article in video form for your convenience:

Subscribe to our Newsletter

Let us send you the best of what we've discovered in DevOps, Cloud and Kubernetes, as well us occasional event announcements.

We are also preparing some ways to learn together: weekly challenges, free courses and more. Subscribe now to be the first to get those.