I like to keep my terminal lean and productive, here is a list of some awesome tools to help you with your daily work
I use Brew for installing everything on my Mac. To install brew itself simply run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Alfred is an application launcher for Mac which is not directly terminal related but I use it to start my terminal, so worth the mention.
Keyboard shortcut just the one and only:
Cmd+Space: Open Alfred app
brew install alfred
Alternatives: QuickSilver, Launchbar, Spotilight.
As a terminal emulator I prefer to use iTerm2, which integrates great with other tools in this list. Some of my favourite features are spawning multiple terminals to work with.
Keyboard shortcuts I use daily:
Cmd+Enter: Fullscreen mode.
Cmd+D: Split horizontally.
Cmd+]: Next or previous terminal.
Cmd+t: New tab terminal.
Cmd+Alt+i: Broadcast input to all panes in current tab.
The last one I'm not using daily, but it super helpful in case you want to perform a repetitive work in multiple folders | servers | containers | clusters.
Choosing a shell is something of a personal preference, I chose some time ago zsh and have sticked to it since then.
Powerlevel10k (or p10k) is a zsh theme that greatly improves the UX of the CLI itself. Once installed do
p10k configure and it will interactively prompt you to customize it as you want.
Some of my favourite features here are:
kubectlso it appears the moment I strike
kon my keyboard:
brew install p10k; p10k configure
P10k prompts if you want automatic installation of
Meslo Nerd Font during
p10k configure process. As a console font is good enough for me, so I'm sticking with that one.
Z is one of those small tools that really make a difference! Its description is "jump around" and is used as a direct replacement of
cd to switch directories.
Instead of jumping by using absolute or relative paths between directories, it tracks your most frequent paths and jumps to the best match. So instead of doing for example
cd ~/src/private/harbur/docs/playbook I simply do
z play and it picks it up.
brew install z
Cloud native is almost synonym these days with kubernetes, so kubectl on the CLI is a must. There are different ways to install the binary, for the sake of uniformity we'll install it with brew.
brew install kubernetes-cli
Either if you're starting out or you're an experienced user of kubernetes one of the best ways to start a Kubernetes cluster locally is using minikube.
brew install minikube
If you work with many clusters or many namespaces it s(h)aves a loooot of time to avoid passing those as parameters to each command, instead you can switch your active context or namespace to be the one you want to use.
For that you can use kubectx. It installs both
kubens for switching context or namespace respectively, combined with the "Show on command" feature of p10k at the right side of the screen it really shines:
brew install kubectx
Helm is a package manager for kubernetes, it helps you organize multiple resources and install them together as a unified app, it also manages the lifecycle of the releases providing the ability to do upgrades and rollbacks.
Make sure to use v3, as helm v2 has reached its end-of-life.
brew install helm
Stern is a multi pod and container log tailing for Kubernetes, so for example if you want to get the logs of a deployment with two pods you simply do
stern nginx and it will tail the logs of both pods on screen:
Kubernetic is a desktop client for kubernetes focused on productivity. While CLI is great for productivity and automation when needed, Kubernetic is best for feature discoverability, provides a great learning platform for newcomers, and is actually faster than working with the CLI for experienced users.
With Kubernetic you can manage multiple contexts & namespaces, see resources usage consumption, do port-forwarding of services, execute commands in containers, craft resources without extensive YAML knowledge and much much more.
brew install kubernetic