Three CLI Tools I use every day [Week 31/2020 in Review]
Tags: github, twitter, cli, books
Published: 2020-08-04 16:31:18

_If you like my [articles](https://dev.to/natterstefan), you probably like my [tweets](https://twitter.com/natterstefan) and [newsletter](https://newsletter.natterstefan.me/) too. Let's connect on [_LinkedIn_](http://www.linkedin.com/in/natterstefan). 🚀_

---

Hello 👋🏻.

Welcome to my "Week in Review" series. Each week I will share what I discovered, learned, and tested with you.

Today I am gonna show you CLI tools I use on a daily basis. They help me a lot during development.

Let's jump right into it.

---

## Highlights

Before we get to the key topic, let's look at one awesome highlight from my Twitter feed.

[Astrit](https://twitter.com/AstritMalsija) nominated me for the [GitHub Stars Programm](https://stars.github.com/program). What an honor 😅. Thank you very much, my friend.

{% twitter 1288009160509001728 %}

Catalin released his ebook ["Improve Your Online Presence"](https://gumroad.com/a/921269363) - that was definitely a highlight of last week.

---

## Three CLI Tools I use every day

There are probably more than these CLI tools I use every day, but I want to show you these three: [asdf](https://asdf-vm.com/#/), [thefuck](https://github.com/nvbn/thefuck), [gh](https://github.com/cli/cli).

### asdf

asdf is _the_ version manager for macOS. It can manage more than just node ([nvm](https://github.com/nvm-sh/nvm)), yarn ([yvm](https://yvm.js.org/docs/overview)), or python ([pyenv](https://github.com/pyenv/pyenv)). Their [list of plugins](https://asdf-vm.com/#/plugins-all) is large. If you switch a lot between projects with different versions, it saves you some keystrokes and headaches.

Installing `asdf` is easy, just run:

```bash
brew install asdf

# update asdf with
brew upgrade asdf
```

Now you need to add asdf to your shell by adding the following to `~/.zshrc` or `~/.bash_profile`:

```bash
. $(brew --prefix asdf)/asdf.sh
```

Let's say you want to install node with the version 12.14.1:

```bash
asdf plugin add nodejs
asdf install nodejs 12.14.1
```

Now you have nodejs available with this version on your system. If you want to use this version in one of your projects add a `.tool-versions` file in the project's root folder It can look like this:

```
nodejs 12.14.1
```

This would now tell `asdf` to _automatically_ load nodejs with the version 12.14.1. That's it.

I removed all other version managers and only use asdf now. You can read more about it on [asdf-vm.com](https://asdf-vm.com/).

### thefuck

How many times have you entered a command in your terminal, just to get an error message because your command includes a typo? It happened quite often to me in the beginning. I could get angry when that happened and say "f**k" sometimes.

One day a friend asked me if I already knew the tool of the same name. I said no but immediately googled it.

After reading the [docs](https://github.com/nvbn/thefuck) I had to install this. Now every time I have a typo I just write `fuck`, hit enter again and the tool corrects my mistake. It just works and saves time.

Does this sound familiar to you? You create a new branch with `git checkout -b feature/awesome`. You change some code and commit it. Now you want to push your changes with `git push`. Git tells you that there is no branch on origin and you need to create one first. In the past, I copied ` git push --set-upstream origin feature/awesome` manually _every time_ and pushed it again. Now I just enter `fuck` and hit enter without leaving my keyboard!

### gh

`gh` is GitHub’s official command-line tool. Once installed (with e.g. `brew install github/gh/gh`, see other [OS guides](https://github.com/cli/cli#installation)) you can run commands from your terminal to create pull requests, issues or repositories within seconds. The following commands are available.

- `gh pr [status, list, view, checkout, create]`
- `gh issue [status, list, view, create]`
- `gh repo [view, create, clone, fork]`
- `gh config [get, set]`
- `gh help`

This was already helpful to me on many occasions.

What are some CLI tools you use? Let me know in the comments, please.

## 📗 Books

I finished reading ["Clean Code" by Robert "Uncle Bob" C. Martin](https://amzn.to/2ZoKeop). The book is well structured and gets to the point very quickly. The individual Dos and Don'ts are understandable and comprehensible. I recommend everyone to browse through this bestseller. It pays off in my opinion.

Furthermore, Catalin released his ebook ["Improve Your Online Presence"](https://gumroad.com/a/921269363). It covers lots of tips about how to improve your social media skills. I wrote [a book review](https://dev.to/natterstefan/improve-your-online-presence-by-catalin-pit-book-review-1558) about it.

What are you reading? Share your recommendations in the comments below. 🙏🏻

## ⛓ Links of the Week

- [Bannerbear](https://www.bannerbear.com/) offers a simple API that auto-generates social media visuals, e-commerce banners, and more. You can create Banners for [Medium](https://www.bannerbear.com/demos/mediumformat/#generate) and [Twitter](https://www.bannerbear.com/demos/tweetagram/) for free. The first 50 custom images are free ([Pricing](https://www.bannerbear.com/pricing/)).
- Create [Medium](https://medium.com/@natterstefan) posts with [Markdown2Medium](https://markdowntomedium.com/) in seconds.
- I am a huge fan of [Sizzy](https://a.paddle.com/v2/click/49831/107029?link=1947), the browser for developers. In an interesting talk with [Bernd Artmüller](https://twitter.com/natterstefan/status/1287822527914442754) he showed me [Polypane](https://polypane.app/). It looks similar to Sizzy from what I've seen so far. Both can be a life-saver when it comes to responsive web design. Test and build things faster with either of them.
- Do you want to add comments to your website? Either you use the built-in comment system for your CMS (e.g. WordPress), [Disqus](https://disqus.com/) or you try one of these alternatives: [Commento](https://commento.io/) or [utterances](https://utteranc.es/). Commento promises to be a privacy-focused commenting software, whereas utteranc.es stores the comments in public GitHub repository.
- Write and publish Twitter threads without any hassle with [Chirr App](https://getchirrapp.com/). I used this tool and can recommend it. It's free for publishing Threads and works.
- Do you like [Netflix sliders](https://codesandbox.io/s/ly4525156l?from-embed) as I do? Do you want to have a similar slider on your own website? You do? Then "[How to implement Netflix slider with React and hooks](https://levelup.gitconnected.com/how-to-implement-netflix-slider-with-react-and-hooks-bdb9b99d1ce4)" written by Patryk Andrzejewski is for you. He explains it step-by-step how you can create your own Netflix-like slider with React.
- Speaking about sliders, [SwiperJS](https://swiperjs.com/demos/) is a solid solution for your next slider.
- Dan published a [fancy button with animation on CodePen](https://codepen.io/dan_spratling/pen/yLeZYqK).
- Wanna know how many people visited your GitHub or Notion pages? Then [HITS](https://hits.seeyoufarm.com/) is for you.
- VS Code is my IDE of choice and so I am constantly looking for ways to improve it, my workflow, and productivity. Reading ["How to Configure VS Code Like a Pro"](https://medium.com/better-programming/how-to-configure-vs-code-like-a-pro-782d2d718586) introduced me to an interesting use-case for `tasks.json`. You can [automatically run tasks when you start VS Code](https://code.visualstudio.com/Docs/editor/tasks#_run-behavior). I did not know that but have some use case for it (e.g. automatically run `yarn install` when I open the project).
- Do you feel like writing too complex code? Analyze your code with [CodeMetrics](https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-codemetrics) and you will know. :)
- and another link talking about VS Code: [Codetour](https://github.com/vsls-contrib/codetour). Did you know you can create onboarding codetours for contributors? I have not used it yet, but I can think of some use-cases already. This can be helpful for both public and closed-source repositories.
- I am preparing an article about "how to handle, optimize and use SVGs in a React app" (as [promised on Twitter](https://twitter.com/natterstefan/status/1288922016142307328)). During my research, I read this interesting article ["Using web fonts with SASS and Webpack"](https://varya.me/blog/webfonts-with-sass-and-webpack/) which might help one of you too.

##  🐦 Tweets of the Week

{% twitter 1287950733380218880 %}
{% twitter 1287835846138306562 %}
{% twitter 1288994719142301696 %}
{% twitter 1289292752639811584 %}
{% twitter 1289282182964367360 %}
{% twitter 1289561112023912448 %}
{% twitter 1289818213983883270 %}
{% twitter 1289877573132939266 %}
{% twitter 1289923081184718849 %}
{% twitter 1281230168368054275 %}
{% twitter 1290149132913401856 %}

This is it for week 31/20.

See you next week - thank you. 👋🏻

Stefan

---

_If you like this article, chances are you will like my [newsletter](https://newsletter.natterstefan.me/) too. 🚀_

Let's stay connected on [_Twitter_](https://twitter.com/natterstefan) and [_LinkedIn_](http://www.linkedin.com/in/natterstefan).

---

_This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article._