9 shell tools for productivity
Tags: programming, productivity, opensource, devjournal
Published: 2022-09-04 18:38:22

So recently, I spent a few days trying to recreate my usual environment on a new laptop. Many of the tools I use became so natural that I forgot that they weren't there in the first place. After a couple of days of intense memory exercises, I finally managed to get everything together. At first, this post was a memo to save my future self from more brain push-ups. But then I thought that it could be helpful to someone else. Behold, community, this is the list of the tools I use daily:

### 1. [Oh My Zsh](https://ohmyz.sh/)
I use `zsh` shell because it's ~~the default option on macOS~~ really powerful. But there is a way to take it to the next level — `oh-my-zsh`. It comes with a [bunch of handy commands](https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet) and a powerful way to configure and extend your shell with [plugins](https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins). There are also [themes](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes) if you want a different shell flavor.

### 2. [powerlevel10k theme](https://github.com/romkatv/powerlevel10k)
![Theme preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t84purm6h3s0nwbf4xvg.png)
I really like how it looks, but I also like how fast it is. P10K can magically skip a lag between you hitting an `enter` key and a prompt appearing on the screen. It also works during shell startup, e.g., if it suffers from plugin bloat. Speaking of which, powerlevel10k natively [integrates with many of them](https://github.com/romkatv/powerlevel10k#batteries-included). For example, it can detect your current Python virtual environment or AWS user and display them in the shell prompt.

### 3. [bgnotify](https://github.com/t413/zsh-background-notify)

![bgnotify notification](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/maodoxt9vo3jnbhly81g.png)
This small tool fires notifications when a command finishes executing in a terminal. No more switching between windows every 5 seconds to check on rust compilation!

### 4. [direnv](https://direnv.net/)

![Direnv demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ngi0oieju9ajy3nb7qdp.gif)
A must-have if you use environment variables a lot. You export them in a `.envrc` file and place it in the root directory of your project. Then those variables are automatically loaded upon entering that directory. Direnv also provides [handy functions](https://direnv.net/man/direnv-stdlib.1.html#stdlib) for `.envrc` file, and it can load envs from `.env`!

### 5. [fzf](https://github.com/junegunn/fzf)

![fzf demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zk7lne96royd12dmikw.gif)
Command-line fuzzy finder. I use it mainly with reverse search by command history. Outputs a list of results and has an [extended syntax](https://github.com/junegunn/fzf#search-syntax) for searching.

### 6. [pyenv](https://github.com/pyenv/pyenv)
![pyenv](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/almhto7k2yi6sax5yhz9.png)
Pyenv lets you install different versions of python on your system simultaneously, without breaking a thing. You can switch between any of them in [one command](https://github.com/pyenv/pyenv#switch-between-python-versions). You can also bind a specific version to a directory, which will activate every time you enter it. There is an [extension](https://github.com/pyenv/pyenv-virtualenv) that adds support for virtual environments.

### 7. [lazygit](https://github.com/jesseduffield/lazygit)
Lazygit is a terminal UI for git. It's less wordy than the CLI and not as bloated as a GUI tool or an IDE plugin. I like it because it has most of the information I need on a single screen and provides many shortcuts for frequently used commands. Here is a video that shows more interesting things Lazygit can do.
{% embed https://www.youtube.com/watch?v=CPLdltN7wgE %}

### 8. [z script](https://github.com/rupa/z)
A simple script that gathers statistics on your filesystem tree "movements" and uses it to teleport you to the most "frecent" directories. For example, if you frequently navigate to your project directory cd `~/work/company/myapp`, you can use `z myapp` to jump right in.

### 9. [wuzz](https://github.com/asciimoo/wuzz)

![Wuzz demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/657q522pf1zlcehccj2z.gif)
A useful tool for exploring HTTP requests. Unfortunately, it's rarely updated, but it does the basic stuff.

---

And that wraps things up. If you know other amazing tools that help you be more productive, share them in the comments!